direnv: Disable Cgo to build a static executable (#486452)

This commit is contained in:
adisbladis
2026-03-22 22:35:58 +00:00
committed by GitHub
+3
View File
@@ -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