summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-04-26 20:42:19 +0200
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-04-26 20:43:43 +0200
commit8a83d611f578076031c4cd30b0a5f4cf43188129 (patch)
treed6f7ba96fa97714cb938dbae262dbd38a75f4650 /lib
parent99de33bb1d8724c5a60369c4605b4f517bb78fc9 (diff)
lib/types: only accept derivations for shellPackage
Since shellPackage actually requires the value to be an attribute set
(i. e. an derivation in this case), we cannot re-use the package.check
type checker since it also allows strings or things that are coercible
to strings as long as they look like store paths.
Diffstat (limited to 'lib')
-rw-r--r--lib/types.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix
index d0a8e96149d70..31ce440bcb48e 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -337,7 +337,7 @@ rec {
     };
 
     shellPackage = package // {
-      check = x: (package.check x) && (hasAttr "shellPath" x);
+      check = x: isDerivation x && hasAttr "shellPath" x;
     };
 
     path = mkOptionType {