Loading pkgs/by-name/co/containerd/package.nix +9 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,15 @@ buildGoModule rec { hash = "sha256-LXBGA03FTrrbxlH+DxPBFtp3/AYQf096YE2rpe6A+WM="; }; postPatch = "patchShebangs ."; postPatch = '' patchShebangs . '' + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' # When cross-compiling with CGO_ENABLED=0, we can't use -extldflags "-static" # Remove it from SHIM_GO_LDFLAGS to avoid linking errors substituteInPlace Makefile \ --replace-fail '-extldflags "-static"' "" ''; vendorHash = null; Loading Loading
pkgs/by-name/co/containerd/package.nix +9 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,15 @@ buildGoModule rec { hash = "sha256-LXBGA03FTrrbxlH+DxPBFtp3/AYQf096YE2rpe6A+WM="; }; postPatch = "patchShebangs ."; postPatch = '' patchShebangs . '' + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' # When cross-compiling with CGO_ENABLED=0, we can't use -extldflags "-static" # Remove it from SHIM_GO_LDFLAGS to avoid linking errors substituteInPlace Makefile \ --replace-fail '-extldflags "-static"' "" ''; vendorHash = null; Loading