buildGoModule: inherit env from main package to goModule derivation
This commit is contained in:
parent
51af9f69ac
commit
3e28bdc678
|
@ -142,6 +142,7 @@ Many attributes [controlling the build phase](#variables-controlling-the-build-p
|
||||||
- [`patchFlags`](#var-stdenv-patchFlags)
|
- [`patchFlags`](#var-stdenv-patchFlags)
|
||||||
- [`postPatch`](#var-stdenv-postPatch)
|
- [`postPatch`](#var-stdenv-postPatch)
|
||||||
- [`preBuild`](#var-stdenv-preBuild)
|
- [`preBuild`](#var-stdenv-preBuild)
|
||||||
|
- `env`: useful for passing down variables such as `GOWORK`.
|
||||||
|
|
||||||
To control test execution of the build derivation, the following attributes are of interest:
|
To control test execution of the build derivation, the following attributes are of interest:
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ buildGoModule rec {
|
||||||
|
|
||||||
vendorHash = "sha256-8YcJXvR0cdL9PlP74Qh6uN2XZoN16sz/yeeZlBsk5N8=";
|
vendorHash = "sha256-8YcJXvR0cdL9PlP74Qh6uN2XZoN16sz/yeeZlBsk5N8=";
|
||||||
|
|
||||||
GOWORK = "off";
|
env.GOWORK = "off";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
installShellFiles
|
installShellFiles
|
||||||
|
|
|
@ -15,7 +15,7 @@ buildGoModule rec {
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" ];
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|
||||||
GOWORK = "off";
|
env.GOWORK = "off";
|
||||||
|
|
||||||
subPackages = [ "cmd/talosctl" ];
|
subPackages = [ "cmd/talosctl" ];
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,7 @@ let
|
||||||
preBuild = args.preBuild or "";
|
preBuild = args.preBuild or "";
|
||||||
postBuild = args.modPostBuild or "";
|
postBuild = args.modPostBuild or "";
|
||||||
sourceRoot = args.sourceRoot or "";
|
sourceRoot = args.sourceRoot or "";
|
||||||
|
env = args.env or { };
|
||||||
|
|
||||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
|
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
|
||||||
"GIT_PROXY_COMMAND"
|
"GIT_PROXY_COMMAND"
|
||||||
|
|
|
@ -20,7 +20,7 @@ buildGoModule {
|
||||||
|
|
||||||
modRoot = "go/cli/mcap";
|
modRoot = "go/cli/mcap";
|
||||||
|
|
||||||
GOWORK="off";
|
env.GOWORK="off";
|
||||||
|
|
||||||
# copy the local versions of the workspace modules
|
# copy the local versions of the workspace modules
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
|
|
|
@ -19,7 +19,7 @@ buildGoModule rec {
|
||||||
|
|
||||||
subPackages = [ "cmd/policy" ];
|
subPackages = [ "cmd/policy" ];
|
||||||
# disable go workspaces
|
# disable go workspaces
|
||||||
GOWORK = "off";
|
env.GOWORK = "off";
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ buildGoModule rec {
|
||||||
|
|
||||||
subPackages = [ "cmd" ];
|
subPackages = [ "cmd" ];
|
||||||
|
|
||||||
GOWORK = "off";
|
env.GOWORK = "off";
|
||||||
|
|
||||||
modRoot = "v2";
|
modRoot = "v2";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user