mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
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 ? {}
|
||||
|
||||
# Not needed with buildGoModule
|
||||
, goPackagePath ? null
|
||||
, goPackagePath ? ""
|
||||
|
||||
, ... }@args':
|
||||
|
||||
with builtins;
|
||||
|
||||
assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`";
|
||||
|
||||
let
|
||||
args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "disabled" ];
|
||||
args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" ];
|
||||
|
||||
go-modules = if vendorSha256 != null then stdenv.mkDerivation (let modArgs = {
|
||||
|
||||
@ -240,7 +242,5 @@ let
|
||||
[ lib.maintainers.kalbasit ];
|
||||
};
|
||||
});
|
||||
in if (goPackagePath != null) then
|
||||
throw "`goPackagePath` not needed with `buildGoModule`"
|
||||
else
|
||||
in
|
||||
package
|
||||
|
Loading…
Reference in New Issue
Block a user