diff options
| author | Silvan Mosberger <contact@infinisil.com> | 2022-09-23 22:14:46 +0200 |
|---|---|---|
| committer | Silvan Mosberger <contact@infinisil.com> | 2022-09-23 22:14:46 +0200 |
| commit | 7b4b779ead7eadcc1973d7b8dfa872b46e7decbc (patch) | |
| tree | 974ba9f6d433c31306cf118977751c5dca1defcc | |
| parent | Merge pull request #192612 from superherointj/broken-cntk (diff) | |
| download | nixpkgs-7b4b779ead7eadcc1973d7b8dfa872b46e7decbc.tar.gz | |
direnv: Also install to /share/direnv/lib/nix-direnv.sh
This allows setting DIRENV_CONFIG to (nix-profile)/share/direnv and have
it find the nix-direnv script, while also allowing other direnv
integrations to coexist.
Old path kept for backwards compat.
| -rw-r--r-- | pkgs/tools/misc/nix-direnv/default.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/tools/misc/nix-direnv/default.nix b/pkgs/tools/misc/nix-direnv/default.nix index e4e34d1fb6ea..132e0787d2c8 100644 --- a/pkgs/tools/misc/nix-direnv/default.nix +++ b/pkgs/tools/misc/nix-direnv/default.nix @@ -26,6 +26,9 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall install -m500 -D direnvrc $out/share/nix-direnv/direnvrc + + # Allows NixOS to set DIRENV_CONFIG to /run/current-system/sw/share/direnv and have direnv load this + install -m500 -D direnvrc $out/share/direnv/lib/nix-direnv.sh runHook postInstall ''; |
