summary refs log tree commit diff
path: root/pkgs/development/go-modules/generic/default.nix
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2021-02-16 03:53:04 +1000
committerGitHub <noreply@github.com>2021-02-15 09:53:04 -0800
commitbb419e051d19e04046085f6c7d4ec1f363086a64 (patch)
tree9c897bca0a83e9d7f9702b2bb35ac809ce3bfcf5 /pkgs/development/go-modules/generic/default.nix
parent478c52b7e54bf88d60ab2f89a189d32cb288d9bc (diff)
downloadnixpkgs-bb419e051d19e04046085f6c7d4ec1f363086a64.tar
nixpkgs-bb419e051d19e04046085f6c7d4ec1f363086a64.tar.gz
nixpkgs-bb419e051d19e04046085f6c7d4ec1f363086a64.tar.bz2
nixpkgs-bb419e051d19e04046085f6c7d4ec1f363086a64.tar.lz
nixpkgs-bb419e051d19e04046085f6c7d4ec1f363086a64.tar.xz
nixpkgs-bb419e051d19e04046085f6c7d4ec1f363086a64.tar.zst
nixpkgs-bb419e051d19e04046085f6c7d4ec1f363086a64.zip
buildGoModule: use assert for checking goPackagePath (#113046)
also remove a `disabled` leftover from 26117ed4b78020252e49fe75f562378063471f71
Diffstat (limited to 'pkgs/development/go-modules/generic/default.nix')
-rw-r--r--pkgs/development/go-modules/generic/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix
index c0f10ab5d8f..8246eaefed4 100644
--- a/pkgs/development/go-modules/generic/default.nix
+++ b/pkgs/development/go-modules/generic/default.nix
@@ -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