diff --git a/pkgs/tools/misc/direnv/default.nix b/pkgs/tools/misc/direnv/default.nix index f0c7aefc69a..a659c576d8f 100644 --- a/pkgs/tools/misc/direnv/default.nix +++ b/pkgs/tools/misc/direnv/default.nix @@ -18,6 +18,11 @@ buildGoModule rec { stdenv.lib.optionalString (!stdenv.hostPlatform.isWindows) "${bash}/bin/bash"; + # fix hardcoded GOFLAGS in makefile. remove once https://github.com/direnv/direnv/issues/718 is closed. + postPatch = '' + substituteInPlace GNUmakefile --replace "export GOFLAGS=-mod=vendor" "" + ''; + # replace the build phase to use the GNUMakefile instead buildPhase = '' make BASH_PATH=$BASH_PATH