nixpkgs/pkgs/tools/misc/direnv/default.nix

37 lines
1.1 KiB
Nix
Raw Normal View History

2013-11-17 14:00:12 +00:00
{ fetchurl, stdenv, go }:
2016-03-27 15:37:07 +01:00
stdenv.mkDerivation rec {
2013-11-17 14:00:12 +00:00
name = "direnv-${version}";
2016-03-27 15:37:07 +01:00
version = "2.8.0";
2013-11-17 14:00:12 +00:00
src = fetchurl {
url = "http://github.com/zimbatm/direnv/archive/v${version}.tar.gz";
name = "direnv-${version}.tar.gz";
2016-03-27 15:37:07 +01:00
sha256 = "1l1kvjgpak7cc9s37qipfw6lybb4650zwd8kcdagm409gs89mil6";
2013-11-17 14:00:12 +00:00
};
buildInputs = [ go ];
buildPhase = "make";
installPhase = "make install DESTDIR=$out";
meta = {
description = "A shell extension that manages your environment";
2013-11-17 14:00:12 +00:00
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;
maintainers = [ stdenv.lib.maintainers.zimbatm ];
2014-07-03 19:15:09 +01:00
platforms = go.meta.platforms;
2013-11-17 14:00:12 +00:00
};
}