summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2022-09-23 22:14:46 +0200
committerSilvan Mosberger <contact@infinisil.com>2022-09-23 22:14:46 +0200
commit7b4b779ead7eadcc1973d7b8dfa872b46e7decbc (patch)
tree974ba9f6d433c31306cf118977751c5dca1defcc
parentMerge pull request #192612 from superherointj/broken-cntk (diff)
downloadnixpkgs-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.nix3
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
'';