summary refs log tree commit diff
path: root/pkgs/tools/misc/direnv
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2020-05-29 16:02:49 +0200
committerGitHub <noreply@github.com>2020-05-29 14:02:49 +0000
commitbc3b694a39174ceed2fd711f404ff53e0f12f56a (patch)
treef9ed4709e2c8f6fc1017c9c3e3216fcfb50a716a /pkgs/tools/misc/direnv
parent7172514b72bb080f144e132627fd836a5dca2966 (diff)
downloadnixpkgs-bc3b694a39174ceed2fd711f404ff53e0f12f56a.tar
nixpkgs-bc3b694a39174ceed2fd711f404ff53e0f12f56a.tar.gz
nixpkgs-bc3b694a39174ceed2fd711f404ff53e0f12f56a.tar.bz2
nixpkgs-bc3b694a39174ceed2fd711f404ff53e0f12f56a.tar.lz
nixpkgs-bc3b694a39174ceed2fd711f404ff53e0f12f56a.tar.xz
nixpkgs-bc3b694a39174ceed2fd711f404ff53e0f12f56a.tar.zst
nixpkgs-bc3b694a39174ceed2fd711f404ff53e0f12f56a.zip
direnv: fix missing BASH_PATH (#89165)
This was broken by the switch to go modules (#87932) which doesn't
respect makeFlags.

Fixes #89129
Diffstat (limited to 'pkgs/tools/misc/direnv')
-rw-r--r--pkgs/tools/misc/direnv/default.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/tools/misc/direnv/default.nix b/pkgs/tools/misc/direnv/default.nix
index 1b6b87984c6..47668986a46 100644
--- a/pkgs/tools/misc/direnv/default.nix
+++ b/pkgs/tools/misc/direnv/default.nix
@@ -14,9 +14,14 @@ buildGoModule rec {
   };
 
   # we have no bash at the moment for windows
-  makeFlags = stdenv.lib.optional (!stdenv.hostPlatform.isWindows) [
-    "BASH_PATH=${bash}/bin/bash"
-  ];
+  BASH_PATH =
+    stdenv.lib.optionalString (!stdenv.hostPlatform.isWindows)
+    "${bash}/bin/bash";
+
+  # replace the build phase to use the GNUMakefile instead
+  buildPhase = ''
+    make BASH_PATH=$BASH_PATH
+  '';
 
   installPhase = ''
     make install DESTDIR=$out