buildGoModule: format

Co-authored-by: Yueh-Shun Li <shamrocklee@posteo.net>
This commit is contained in:
zowoq 2023-05-28 07:46:45 +10:00
parent 2435bbb9a5
commit 304940d98e

View file

@ -46,7 +46,8 @@
, buildFlags ? ""
, buildFlagsArray ? ""
, ... }@args':
, ...
}@args':
assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`";
assert (args' ? vendorHash && args' ? vendorSha256) -> throw "both `vendorHash` and `vendorSha256` set. only one can be set.";
@ -56,7 +57,6 @@ let
go-modules = if (vendorHash == null) then "" else
(stdenv.mkDerivation {
name = "${name}-go-modules";
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ go git cacert ];
@ -79,7 +79,9 @@ let
GO111MODULE = "on";
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
"GIT_PROXY_COMMAND" "SOCKS_SERVER" "GOPROXY"
"GIT_PROXY_COMMAND"
"SOCKS_SERVER"
"GOPROXY"
];
configurePhase = args.modConfigurePhase or ''