1 { lib, stdenv, fetchFromGitHub, buildGoModule, bash, fish, zsh }:
7 src = fetchFromGitHub {
11 hash = "sha256-C4FkBS+2MZGGlpWb7ng4Aa9IvqEuY716M5h2W3b8N1E=";
14 vendorHash = "sha256-O2NZgWn00uKLstYPIj9LwyF4kmitJ1FXltazv8RrmZg=";
16 # we have no bash at the moment for windows
18 lib.optionalString (!stdenv.hostPlatform.isWindows)
21 # replace the build phase to use the GNUMakefile instead
23 make BASH_PATH=$BASH_PATH
27 make install PREFIX=$out
30 nativeCheckInputs = [ fish zsh ];
33 export HOME=$(mktemp -d)
34 make test-go test-bash test-fish test-zsh
38 description = "Shell extension that manages your environment";
40 Once hooked into your shell direnv is looking for an .envrc file in your
41 current directory before every prompt.
43 If found it will load the exported environment variables from that bash
44 script into your current environment, and unload them if the .envrc is
45 not reachable from the current path anymore.
47 In short, this little tool allows you to have project-specific
48 environment variables.
50 homepage = "https://direnv.net";
51 license = licenses.mit;
52 maintainers = [ maintainers.zimbatm ];
53 mainProgram = "direnv";