buildGoModule: use assert for checking goPackagePath (#113046)

also remove a `disabled` leftover from 26117ed4b7
This commit is contained in:
zowoq 2021-02-16 03:53:04 +10:00 committed by GitHub
parent 478c52b7e5
commit bb419e051d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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