treewide: specify CGO_ENABLED with env.CGO_ENABLED

Programmatically prefixing "CGO_ENABLED =" and "CGO_ENABLED=0;" with
"env.", but excluding the files
* pkgs/build-support/go/module.nix (buildGoModule implementation)
* pkgs/development/compilers/go/* (the Go compiler)
* pkgs/build-support/docker/tarsum.nix (not using buildGoModule)
This commit is contained in:
Yueh-Shun Li 2024-11-28 08:10:54 +08:00
parent 44876c6004
commit 905dc8d978
134 changed files with 137 additions and 137 deletions

View File

@ -182,7 +182,7 @@ When set to `0`, the [cgo](https://pkg.go.dev/cmd/cgo) command is disabled. As c
program can't link against C libraries anymore, and the resulting binary is statically linked.
When building with CGO enabled, Go will likely link some packages from the Go standard library against C libraries,
even when the target code does not explicitly call into C dependencies. With `CGO_ENABLED = 0;`, Go
even when the target code does not explicitly call into C dependencies. With `env.CGO_ENABLED = 0;`, Go
will always use the Go native implementation of these internal packages. For reference see
[net](https://pkg.go.dev/net#hdr-Name_Resolution) and [os/user](https://pkg.go.dev/os/user#pkg-overview) packages.
Notice that the decision whether these packages should use native Go implementation or not can also be controlled

View File

@ -23,7 +23,7 @@ buildGoModule rec {
sed -e '/^hooks:/,+2 d' -i plugin.yaml
'';
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];

View File

@ -30,7 +30,7 @@ buildGoModule rec {
# require network/login
doCheck = false;
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
postInstall = ''
install -dm755 $out/helm-dt/bin

View File

@ -39,7 +39,7 @@ let
doCheck = false;
# https://github.com/hashicorp/terraform-provider-scaffolding/blob/a8ac8375a7082befe55b71c8cbb048493dd220c2/.goreleaser.yml
# goreleaser (used for builds distributed via terraform registry) requires that CGO is disabled
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${rev}" ];
src = mkProviderFetcher {
name = "source-${rev}";

View File

@ -14,7 +14,7 @@ buildGoModule rec {
vendorHash = "sha256-UTZIx4zXIMdQBQXfzk3+j43yx7vlitw4Mwmon8oYjd8=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];

View File

@ -120,7 +120,7 @@ buildPythonApplication rec {
"fortify3"
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
GOFLAGS = "-trimpath";
configurePhase = ''

View File

@ -15,7 +15,7 @@ buildGoModule rec {
hash = "sha256-MFce+stC+OzUL0H0ahZZAfMwr9Y+EVJIMmhhRl4JYaU=";
};
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
nativeBuildInputs = [ installShellFiles ];

View File

@ -19,7 +19,7 @@ buildGoModule rec {
vendorHash = "sha256-W65lQYGrRg8LwFERj5MBOPFAn2j+FE7ep4ANuAGmfgM=";
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [
"-s"
"-X github.com/gomods/athens/pkg/build.version=${version}"

View File

@ -6,7 +6,7 @@ buildGoModule {
vendorHash = "sha256-BcL9QAc2jJqoPaQImJIFtCiu176nxmVcCLPjXjNBwqI=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
subPackages = [ "cmd/ldap" ];

View File

@ -285,7 +285,7 @@ let
--replace-fail './web' "${authentik-django}/web"
'';
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
vendorHash = "sha256-BcL9QAc2jJqoPaQImJIFtCiu176nxmVcCLPjXjNBwqI=";

View File

@ -6,7 +6,7 @@ buildGoModule {
vendorHash = "sha256-BcL9QAc2jJqoPaQImJIFtCiu176nxmVcCLPjXjNBwqI=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
subPackages = [ "cmd/radius" ];

View File

@ -21,7 +21,7 @@ buildGoModule rec {
vendorHash = "sha256-0I/bvuyosN55oNSMuom4C8rVjxneUaqV19l9OMiwWhU=";
# The dependency github.com/fsnotify/fsevents requires CGO
CGO_ENABLED = if stdenv.hostPlatform.isDarwin then "1" else "0";
env.CGO_ENABLED = if stdenv.hostPlatform.isDarwin then "1" else "0";
ldflags = [
"-s"
"-X main.Version=${version}"

View File

@ -28,7 +28,7 @@ buildGoModule rec {
"-X github.com/ethersphere/bee/v2/pkg/postage/listener.batchFactorOverridePublic=5"
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
postInstall = ''
mkdir -p $out/lib/systemd/system

View File

@ -13,7 +13,7 @@
};
vendorHash = "sha256-SWcQYF8LP6lw5kWlAVFt3qiwDnvpSOXenmdm6TSfJSc=";
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
# These tests use internet, so are failing in Nix build.
# See also: https://todo.sr.ht/~bouncepaw/betula/91
checkFlags = "-skip=TestTitles|TestHEntries";

View File

@ -17,7 +17,7 @@ buildGoModule rec {
rm get_e2e_test.go get_e2e_utils_test.go
'';
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];

View File

@ -23,7 +23,7 @@ buildGoModule rec {
"-X github.com/bitrise-io/bitrise/version.Commit=${src.rev}"
"-X github.com/bitrise-io/bitrise/version.BuildNumber=0"
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
passthru.updateScript = nix-update-script { };

View File

@ -17,7 +17,7 @@ buildGoModule rec {
vendorHash = "sha256-tEVzuhE0Di7edGa5eJHLLqOecCuoj02h91TsZiZU1PM=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -16,7 +16,7 @@ buildGoModule rec {
vendorHash = "sha256-g+LjubG1s3z47I69mEfkSaAmi1+eNSp4M5Wic6h0+Xc=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
subPackages = [ "." ];
ldflags = [

View File

@ -13,7 +13,7 @@ buildGoModule rec {
vendorHash = "sha256-SFsf2QOIuUQY5Zzshb2190pQtOBGEsELBRihOvHYVGA=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];

View File

@ -20,7 +20,7 @@ buildGoModule rec {
subPackages = [ "cmd/capslock" ];
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [ "-s" ];

View File

@ -11,7 +11,7 @@ buildGoModule rec {
sha256 = "sha256-1ySOlP0sFk3+IRt/zstZK6lEE2pzoVSiZz3wFxdesgc=";
};
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
vendorHash = "sha256-KlouLjW9hVKFi9uz34XHd4CzNOiyO245QNygkB338YQ=";

View File

@ -20,7 +20,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
# Some lint checks fail
doCheck = false;

View File

@ -28,7 +28,7 @@ buildGoModule rec {
"-X=main.date=1970-01-01"
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
passthru.tests.version = testers.testVersion { package = cloudflare-dynamic-dns; };

View File

@ -41,7 +41,7 @@ buildGoModule rec {
# https://hydra.nixos.org/build/212378003/log
excludedPackages = "gvproxy";
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
preConfigure = ''
ldflags="-s -w -X github.com/abiosoft/colima/config.appVersion=${version} \

View File

@ -22,7 +22,7 @@ buildGoModule rec {
subPackages = [ "." ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-X 'github.com/lintingzhen/commitizen-go/cmd.revision=${commit_revision}'"

View File

@ -22,7 +22,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [
"-s"
"-w"

View File

@ -34,7 +34,7 @@ buildGoModule rec {
versionCheckHook
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
# These packages contain networking dependent tests which fail in the sandbox
excludedPackages = [

View File

@ -19,7 +19,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s -w -X github.com/kong/deck/cmd.VERSION=${version}"

View File

@ -24,7 +24,7 @@ buildGoModule rec {
vendorHash = "sha256-YcBDurQjGhjds3CB63gTjsPbsvlHJnGxWbsFrx3vCy4=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -14,7 +14,7 @@ buildGoModule rec {
vendorHash = "sha256-bwNuQPGjAQ9Afa2GuPWrW8ytfIvhsOYFKPt0zyfdZhU=";
subPackages = [ "cmd/earthly" "cmd/debugger" ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -18,7 +18,7 @@ buildGoModule rec {
subPackages = [ "cmd/easeprobe" ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -17,7 +17,7 @@ buildGoModule rec {
vendorHash = "sha256-unIyU60IrbiKDIjUf9F2pqqGNIA4gFp5XyQlvx6+xxQ=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];

View File

@ -29,7 +29,7 @@ buildGoModule {
vendorHash = "sha256-Gg1mifMVt6Ma8yQ/t0R5nf6NXbzLZBpuZrYsW48p0mw=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -29,7 +29,7 @@ buildGoModule rec {
vendorHash = null;
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
subPackages = [ "." ];

View File

@ -22,7 +22,7 @@ buildGoModule rec {
vendorHash = "sha256-GT6e9yd6LF6GFlGBWVAmcM6ysB/6cIGLbnM0hxfX5TE=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
subPackages = [ "cmd/ferretdb" ];

View File

@ -33,7 +33,7 @@ let
vendorHash = "sha256-yam3DgY/dfwIRc7OvFltwX29x6xGlrrsK4Oj6oaGYRw=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
buildPhase = ''
runHook preBuild

View File

@ -22,7 +22,7 @@ buildGoModule rec {
vendorHash = "sha256-utHQzXjtdnshUsYDQEQY2qoQGZsnfXXPj3A9VsDj0vQ=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
outputs = [ "out" "man" ];

View File

@ -16,7 +16,7 @@ buildGoModule rec {
vendorHash = "sha256-ns1jFmBvIfclb3SBtdg05qNBy18p6VjtEKrahtxJUM4=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -43,7 +43,7 @@ in buildGo123Module rec {
vendorHash = "sha256-oly6SLgXVyvKQQuPrb76LYngoDPNLjTAs4gWCT3/kew=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -15,7 +15,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
preCheck = ''

View File

@ -20,7 +20,7 @@ buildGoModule rec {
vendorHash = "sha256-EI37KPdNxPXdgmxvawTiRQ516dLxt5o0iYvGcAHXdUw=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -11,7 +11,7 @@ buildGoModule rec {
sha256 = "sha256-DXW0NtFYvcCX4CgMs5/5HPaO9f9eFtw401wmJdCbHPU=";
};
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-X github.com/mzz2017/gg/cmd.Version=${version}" "-s" "-w" ];
vendorHash = "sha256-fnM4ycqDyruCdCA1Cr4Ki48xeQiTG4l5dLVuAafEm14=";

View File

@ -24,7 +24,7 @@ buildGoModule rec {
echo v${version} > ./cmd/go-judge/version/version.txt
'';
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
meta = with lib; {
description = "High performance sandbox service based on container technologies";

View File

@ -21,7 +21,7 @@ buildGoModule rec {
"-X" "github.com/vektra/mockery/v2/pkg/logging.SemVer=v${version}"
];
CGO_ENABLED = false;
env.CGO_ENABLED = false;
proxyVendor = true;
vendorHash = "sha256-z1ceS+LO6d7T264pw2BLadw804aGRISyrKW/dr4fZHA=";

View File

@ -32,7 +32,7 @@ buildGoModule rec {
"-X=github.com/go-task/task/v3/internal/version.version=${version}"
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
postInstall = ''
ln -s $out/bin/task $out/bin/go-task

View File

@ -16,7 +16,7 @@ buildGoModule rec {
vendorHash = "sha256-N8aJmxNQ/p2ddJG9DuIVVjcgzEC6TzD0sz992h3q0RU=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -25,7 +25,7 @@ buildGoModule rec {
"cmd/rewritepkg"
];
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
vendorHash = "sha256-s4bQLXNFhyAk+UNI1xJXQABjBXtPFXiWvmdttV/6Bm8=";

View File

@ -20,7 +20,7 @@ buildGoModule rec {
vendorHash = "sha256-kJysyxROvB0eMAHbvNF+VXatEicn4ln2Vqkzp7GDWAQ=";
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [
"-s"

View File

@ -15,7 +15,7 @@ buildGoModule rec {
};
vendorHash = "sha256-z+FeAXPXKi653im2X2WOP1R9gRl/x7UBnndoEXoxdwA=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
subPackages = [ "." ];

View File

@ -39,7 +39,7 @@ buildGoModule {
vendorHash = "sha256-U/umJ6McCuD0HARVMj1JXHOpVxcph16z7Y7i47Nf3cg=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
postInstall = ''
mv $out/bin/cmd $out/bin/gose

View File

@ -25,7 +25,7 @@ buildGoModule rec {
vendorHash = "sha256-Rf6Xt54y1BN2o90rDW0WvEm4H5pPfsZ786MXFjsAFaM=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -17,7 +17,7 @@ buildGoModule rec {
vendorHash = "sha256-ySgWEGHlEJpfB/BZuRs1bELBspEaiaX/UnJai2V/hx0=";
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
passthru = {
updateScript = nix-update-script { };

View File

@ -22,7 +22,7 @@ buildGoModule rec {
# disabled because it is required to run on docker.
doCheck = false;
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"

View File

@ -34,7 +34,7 @@ buildGoModule {
nativeBuildInputs = [ makeWrapper ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];

View File

@ -10,7 +10,7 @@ buildGoModule {
vendorHash = null;
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
# go installs binary into $out/bin/$GOOS_$GOARCH/hello-go in cross compilation
postInstall = ''

View File

@ -61,7 +61,7 @@ buildGo123Module {
nodejs
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
doCheck = false;
ldflags = [

View File

@ -18,7 +18,7 @@ buildGoModule rec {
hash = "sha256-zWajCfHFqPa3Z72DHcxBUq4bmcCu1lpEKUbZZewpYOE=";
};
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
vendorHash = "sha256-LJpgGeD47Bs+Cq9Z7WWFa49F8/n3exOyxRcd6EkkL2g=";

View File

@ -19,7 +19,7 @@ buildGoModule rec {
subPackages = [ "cmd/imgpkg" ];
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [ "-X=carvel.dev/imgpkg/pkg/imgpkg/cmd.Version=${version}" ];
meta = {

View File

@ -23,7 +23,7 @@ buildGoModule {
version
;
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
nativeBuildInputs = [ installShellFiles ];

View File

@ -24,7 +24,7 @@ buildGoModule rec {
"-X main.gitCommit=${src.rev}"
];
CGO_ENABLED = if stdenv.hostPlatform.isDarwin then "1" else "0";
env.CGO_ENABLED = if stdenv.hostPlatform.isDarwin then "1" else "0";
subPackages = [
"cmd/newrelic-infra"

View File

@ -22,7 +22,7 @@ buildGoModule rec {
subPackages = [ "cmd/jj" ];
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [
"-s"

View File

@ -17,7 +17,7 @@ buildGoModule rec {
vendorHash = "sha256-8sZGnoP7l09ZzLJqq8TUCquTOPF0qiwZcFhojUnnEIY=";
# based on https://github.com/wader/jq-lsp/blob/master/.goreleaser.yml
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -15,7 +15,7 @@ buildGoModule rec {
subPackages = [ "cmd" ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -27,7 +27,7 @@ buildGoModule rec {
--replace "/bin/bash" "${bash}/bin/bash"
'';
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s" "-w"

View File

@ -18,7 +18,7 @@ buildGoModule rec {
vendorHash = "sha256-K9do7u13w2a/9jI7LRtbRvjKJcFU9AnDp2u+ZWSVxw0=";
# https://nixos.org/manual/nixpkgs/stable/#var-go-CGO_ENABLED
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
# https://nixos.org/manual/nixpkgs/stable/#ssec-skip-go-tests
checkFlags = [

View File

@ -15,7 +15,7 @@ buildGoModule rec {
subPackages = [ "cmd/kapp" ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-X carvel.dev/kapp/pkg/kapp/version.Version=${version}"

View File

@ -19,7 +19,7 @@ buildGoModule rec {
subPackages = [ "cmd/kbld" ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-X=carvel.dev/kbld/pkg/kbld/version.Version=${version}"

View File

@ -28,7 +28,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
# static to be easily copied into containers since it's an in-pod pen-testing tool
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -18,7 +18,7 @@ buildGo123Module rec {
vendorHash = "sha256-HTE9vfjRmi5GpMue7lUfd0jmssPgSOljbfPbya4uGsc=";
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [ "-s" ];

View File

@ -30,7 +30,7 @@ buildGoModule rec {
subPackages = [ "." ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -13,7 +13,7 @@ buildGoModule rec {
vendorHash = "sha256-KmAMGKm+cFGRMD1Nyn9/CHv9vUvflAiLJcro08GIGtw=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -33,7 +33,7 @@ buildGoModule rec {
sourceRoot = "${src.name}/cli";
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [
"-s"

View File

@ -13,7 +13,7 @@ buildGoModule rec {
vendorHash = "sha256-V2bgMFJGo1t1MiJyACdB9mjM2xtHwgH6bNEbEeZC2XM=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s" "-w"

View File

@ -20,7 +20,7 @@ buildGoModule rec {
"-X github.com/joyrex2001/kubedock/internal/config.Version=${version}"
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
meta = with lib; {
description = "Minimal implementation of the Docker API that will orchestrate containers on a Kubernetes cluster";

View File

@ -10,7 +10,7 @@ buildGoModule rec {
sha256 = "sha256-oAo/O3T3wtfCumT2kjoyXKfCFHijVzSmxhslaKaeF3Y=";
};
CGO_ENABLED=0;
env.CGO_ENABLED = 0;
ldflags=[ "-w" "-s" "-X main.version=${version}" ];

View File

@ -28,7 +28,7 @@ buildGoModule rec {
subPackages = [ "references/cmd/cli" ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
# Workaround for permission issue in shell completion
HOME = "$TMPDIR";

View File

@ -17,7 +17,7 @@ buildGoModule rec {
vendorHash = "sha256-GazDEm/qv0nh8vYT+Tf0n4QDGHlcYtbMIj5rlZBvpKo=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

View File

@ -27,7 +27,7 @@ buildGoModule rec {
];
# Disable cgo to produce a static binary
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
# Don't run Go tests
doCheck = false;

View File

@ -25,7 +25,7 @@ buildGoModule {
"cmd/mkuimage"
];
CGO_ENABLED = "0";
env.CGO_ENABLED = "0";
ldflags = [ "-s" ];

View File

@ -18,7 +18,7 @@ buildGoModule rec {
vendorHash = "sha256-0OnK5/e0juEYrNJuVkr+tK66btRW/oaHpJSDakB32Bc=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
subPackages = [ "mockgen" ];

View File

@ -32,7 +32,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
passthru.tests.version = testers.testVersion { package = myks; };

View File

@ -21,7 +21,7 @@ buildGoModule rec {
# CGO_ENABLED=0 required for mac - "error: 'TARGET_OS_MAC' is not defined, evaluates to 0"
# https://github.com/shirou/gopsutil/issues/976
CGO_ENABLED = if stdenv.hostPlatform.isLinux then 1 else 0;
env.CGO_ENABLED = if stdenv.hostPlatform.isLinux then 1 else 0;
meta = with lib; {
homepage = "https://mynewt.apache.org/";

View File

@ -16,7 +16,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" "-X github.com/zu1k/nali/internal/constant.Version=${version}" ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''

View File

@ -35,7 +35,7 @@ buildGoModule rec {
vendorHash = "sha256-qDzd+aq08PN9kl1YkvNLGvWaFVh7xFXJhGdx/ELwYGY=";
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
buildInputs = [
libusb1

View File

@ -23,7 +23,7 @@ buildGoModule rec {
"-w"
];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
meta = {
mainProgram = "nodeinfo";

View File

@ -34,7 +34,7 @@ buildGoModule rec {
substituteInPlace containerd/driver.go --replace-warn 'PluginVersion = "v0.9.3"' 'PluginVersion = "v${version}"'
'';
CGO_ENABLED = "1";
env.CGO_ENABLED = "1";
vendorHash = "sha256-OO+a5AqhB0tf6lyodhYl9HUSaWvtXWwevRHYy1Q6VoU=";
subPackages = [ "." ];

View File

@ -40,7 +40,7 @@ buildGoModule rec {
gtk3
];
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
postInstall = ''
mkdir -p $out/share

View File

@ -9,7 +9,7 @@ let
in
buildGoModule {
inherit pname version;
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
vendorHash = "sha256-F8jTvgxOhOGVtl6B8u0xAIvjNwVjBtvAhApzjIgykpY=";
src = fetchFromGitHub {

View File

@ -17,7 +17,7 @@ buildGoModule rec {
subPackages = [ "." ];
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
tags = [
"sqlite"

View File

@ -13,7 +13,7 @@ buildGoModule rec {
vendorHash = "sha256-hgUuntT6jMWI14qDE3Yjm5W8UqQ6CcvoILmSDaVEZac=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" "-X main.date=unknown" ];

View File

@ -22,7 +22,7 @@ buildGoModule rec {
"-w"
];
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
meta = {
description = "Command-line interface for Picocrypt";

View File

@ -48,7 +48,7 @@ buildGoModule rec {
wrapGAppsHook3
];
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
postInstall = ''
mv $out/bin/Picocrypt $out/bin/picocrypt-gui

View File

@ -21,7 +21,7 @@ buildGoModule rec {
# This is the released subpackage from upstream repo
subPackages = [ "examples/base" ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
# Upstream build instructions
ldflags = [

View File

@ -13,7 +13,7 @@ buildGoModule rec {
vendorHash = null;
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
tags = [ "containers_image_openpgp" "remote" ]
++ lib.optional stdenv.hostPlatform.isDarwin "darwin";

View File

@ -14,7 +14,7 @@ buildGoModule rec {
vendorHash = null;
subPackages = ".";
# Pushup doesn't need CGO so disable it.
CGO_ENABLED=0;
env.CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [ makeWrapper ];
# The Go compiler is a runtime dependency of Pushup.

View File

@ -18,7 +18,7 @@ buildGoModule rec {
vendorHash = "sha256-ObroruWWNilHIclqNvbEaa7vwk+1zMzDKbjlVs7Fito=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-X" "main._version_=v${version}"

View File

@ -17,7 +17,7 @@ buildGoModule rec {
vendorHash = "sha256-GUZNPLBgqN1zBzCcPl7TB9/4/Yk4e7K6I20nVaM6ank=";
CGO_ENABLED = 1;
env.CGO_ENABLED = 1;
ldflags = [ "-s" "-w" ];

View File

@ -26,7 +26,7 @@ buildGoModule rec {
nativeBuildInputs = [ makeWrapper ];
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-extldflags=-static" ];

View File

@ -47,7 +47,7 @@ buildGoModule rec {
vendorHash = "sha256-SiQw6pq0Fyy8Ia39S/Vgp9Mlfog2drtVn43g+GXiQuI=";
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [ "-extldflags=-static" ];

View File

@ -20,7 +20,7 @@ buildGoModule rec {
vendorHash = null;
CGO_ENABLED = 0;
env.CGO_ENABLED = 0;
ldflags = [
"-s"

Some files were not shown because too many files have changed in this diff Show More