about summary refs log tree commit diff
path: root/pkgs/tools/misc/direnv/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/direnv/default.nix')
-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 1b6b87984c6f..47668986a460 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