From 55639c3aeb20cf799de5394cc6c9229a99ac505c Mon Sep 17 00:00:00 2001 From: zimbatm Date: Sun, 17 Nov 2013 14:00:12 +0000 Subject: [PATCH] Adds a new package: direnv --- pkgs/tools/misc/direnv/default.nix | 37 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/tools/misc/direnv/default.nix diff --git a/pkgs/tools/misc/direnv/default.nix b/pkgs/tools/misc/direnv/default.nix new file mode 100644 index 000000000000..5588fe3d647f --- /dev/null +++ b/pkgs/tools/misc/direnv/default.nix @@ -0,0 +1,37 @@ +{ fetchurl, stdenv, go }: + +let + version = "2.1.0"; +in +stdenv.mkDerivation { + name = "direnv-${version}"; + src = fetchurl { + url = "http://github.com/zimbatm/direnv/archive/v${version}.tar.gz"; + name = "direnv-${version}.tar.gz"; + sha256 = "4dad14e53aa5a20fd11cdbb907c19a05f16464172af302981adb410bd691cefe"; + }; + + buildInputs = [ go ]; + + buildPhase = "make"; + installPhase = "make install DESTDIR=$out"; + + meta = { + description = "a shell extension that manages your environment"; + longDescription = '' + Once hooked into your shell direnv is looking for an .envrc file in your + current directory before every prompt. + + If found it will load the exported environment variables from that bash + script into your current environment, and unload them if the .envrc is + not reachable from the current path anymore. + + In short, this little tool allows you to have project-specific + environment variables. + ''; + homepage = http://direnv.net; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.all; + maintainers = [ stdenv.lib.maintainers.zimbatm ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 263cbe8ef123..fd1fbe2c4000 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -553,6 +553,8 @@ let ditaa = callPackage ../tools/graphics/ditaa { }; + direnv = callPackage ../tools/misc/direnv { }; + dlx = callPackage ../misc/emulators/dlx { }; eggdrop = callPackage ../tools/networking/eggdrop { };