direnv: no external linkmode

This commit is contained in:
Omar Jatoi
2026-03-23 14:54:54 -04:00
parent 4a6df732e7
commit a4fb16db27
+7
View File
@@ -28,6 +28,13 @@ buildGoModule (finalAttrs: {
# Build a static executable to avoid environment runtime impurities
env.CGO_ENABLED = 0;
# With CGO disabled the internal linker is used by default; remove the
# explicit -linkmode=external flag from the Makefile which is incompatible
# with CGO_ENABLED=0 (see https://github.com/NixOS/nixpkgs/pull/486452)
postPatch = ''
substituteInPlace GNUmakefile --replace-fail " -linkmode=external" ""
'';
# replace the build phase to use the GNUMakefile instead
buildPhase = ''
make BASH_PATH=$BASH_PATH