From 51052568f6498c8669c46bc056e7e1c5d96062f1 Mon Sep 17 00:00:00 2001 From: Paul Meyer Date: Mon, 20 Jan 2025 17:40:32 +0100 Subject: [PATCH] treewide: CGO_ENABLED -> env.CGO_ENABLED Signed-off-by: Paul Meyer --- packages/by-name/cloud-api-adaptor/package.nix | 2 +- packages/by-name/contrast/package.nix | 3 ++- packages/by-name/microsoft/kata-runtime/package.nix | 2 +- packages/by-name/nydus-pull/package.nix | 3 ++- packages/by-name/nydus-snapshotter/package.nix | 2 +- packages/by-name/service-mesh/package.nix | 4 ++-- packages/by-name/tdx-measure/package.nix | 3 ++- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/by-name/cloud-api-adaptor/package.nix b/packages/by-name/cloud-api-adaptor/package.nix index c487317241..5c29a560a7 100644 --- a/packages/by-name/cloud-api-adaptor/package.nix +++ b/packages/by-name/cloud-api-adaptor/package.nix @@ -70,7 +70,7 @@ buildGoModule rec { "cmd/process-user-data" ]; - CGO_ENABLED = if withLibvirt then 1 else 0; + env.CGO_ENABLED = if withLibvirt then 1 else 0; tags = builtinCloudProviders; diff --git a/packages/by-name/contrast/package.nix b/packages/by-name/contrast/package.nix index 2bc395a5a7..d2c97942e1 100644 --- a/packages/by-name/contrast/package.nix +++ b/packages/by-name/contrast/package.nix @@ -203,7 +203,8 @@ buildGoModule rec { install -D ${kata.genpolicy.settings-dev}/genpolicy-settings.json cli/genpolicy/assets/genpolicy-settings-kata.json ''; - CGO_ENABLED = 0; + env.CGO_ENABLED = 0; + ldflags = [ "-s" "-X github.com/edgelesssys/contrast/internal/constants.Version=v${version}" diff --git a/packages/by-name/microsoft/kata-runtime/package.nix b/packages/by-name/microsoft/kata-runtime/package.nix index 2806c201ef..0bfcc1589c 100644 --- a/packages/by-name/microsoft/kata-runtime/package.nix +++ b/packages/by-name/microsoft/kata-runtime/package.nix @@ -44,7 +44,7 @@ buildGoModule rec { git ]; - CGO_ENABLED = 0; + env.CGO_ENABLED = 0; ldflags = [ "-s" ]; checkFlags = diff --git a/packages/by-name/nydus-pull/package.nix b/packages/by-name/nydus-pull/package.nix index ea7d2bde5d..3f40448af8 100644 --- a/packages/by-name/nydus-pull/package.nix +++ b/packages/by-name/nydus-pull/package.nix @@ -14,7 +14,8 @@ buildGoModule rec { subPackages = [ "." ]; - CGO_ENABLED = 0; + env.CGO_ENABLED = 0; + ldflags = [ "-s" "-X main.version=v${version}" diff --git a/packages/by-name/nydus-snapshotter/package.nix b/packages/by-name/nydus-snapshotter/package.nix index 043826e267..1c5eacc5ce 100644 --- a/packages/by-name/nydus-snapshotter/package.nix +++ b/packages/by-name/nydus-snapshotter/package.nix @@ -33,7 +33,7 @@ buildGoModule rec { "cmd/nydus-overlayfs" ]; - CGO_ENABLED = "0"; + env.CGO_ENABLED = "0"; ldflags = [ "-s" diff --git a/packages/by-name/service-mesh/package.nix b/packages/by-name/service-mesh/package.nix index b52c4c6069..cf26f31c30 100644 --- a/packages/by-name/service-mesh/package.nix +++ b/packages/by-name/service-mesh/package.nix @@ -28,10 +28,10 @@ buildGoModule rec { subPackages = [ "." ]; - CGO_ENABLED = 0; + env.CGO_ENABLED = 0; + ldflags = [ "-s" - "-w" "-X main.version=v${version}" ]; diff --git a/packages/by-name/tdx-measure/package.nix b/packages/by-name/tdx-measure/package.nix index 0fdf82fafb..aaa54ede3e 100644 --- a/packages/by-name/tdx-measure/package.nix +++ b/packages/by-name/tdx-measure/package.nix @@ -16,7 +16,8 @@ buildGoModule rec { subPackages = [ "." ]; - CGO_ENABLED = 0; + env.CGO_ENABLED = 0; + ldflags = [ "-s" "-X main.version=v${version}"