diff --git a/pkgs/by-name/di/direnv/package.nix b/pkgs/by-name/di/direnv/package.nix index 7b831c38ef85..97f11d335be6 100644 --- a/pkgs/by-name/di/direnv/package.nix +++ b/pkgs/by-name/di/direnv/package.nix @@ -25,6 +25,9 @@ buildGoModule (finalAttrs: { # we have no bash at the moment for windows env.BASH_PATH = lib.optionalString (!stdenv.hostPlatform.isWindows) "${bash}/bin/bash"; + # Build a static executable to avoid environment runtime impurities + env.CGO_ENABLED = 0; + # replace the build phase to use the GNUMakefile instead buildPhase = '' make BASH_PATH=$BASH_PATH