buildGoModule: use assert for checking goPackagePath (#113046)
also remove a `disabled` leftover from 26117ed4b7
This commit is contained in:
parent
478c52b7e5
commit
bb419e051d
|
@ -34,14 +34,16 @@
|
||||||
, meta ? {}
|
, meta ? {}
|
||||||
|
|
||||||
# Not needed with buildGoModule
|
# Not needed with buildGoModule
|
||||||
, goPackagePath ? null
|
, goPackagePath ? ""
|
||||||
|
|
||||||
, ... }@args':
|
, ... }@args':
|
||||||
|
|
||||||
with builtins;
|
with builtins;
|
||||||
|
|
||||||
|
assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`";
|
||||||
|
|
||||||
let
|
let
|
||||||
args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "disabled" ];
|
args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" ];
|
||||||
|
|
||||||
go-modules = if vendorSha256 != null then stdenv.mkDerivation (let modArgs = {
|
go-modules = if vendorSha256 != null then stdenv.mkDerivation (let modArgs = {
|
||||||
|
|
||||||
|
@ -240,7 +242,5 @@ let
|
||||||
[ lib.maintainers.kalbasit ];
|
[ lib.maintainers.kalbasit ];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
in if (goPackagePath != null) then
|
in
|
||||||
throw "`goPackagePath` not needed with `buildGoModule`"
|
|
||||||
else
|
|
||||||
package
|
package
|
||||||
|
|
Loading…
Reference in New Issue