From 8a83d611f578076031c4cd30b0a5f4cf43188129 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 26 Apr 2021 20:42:19 +0200 Subject: [PATCH] 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. --- lib/types.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types.nix b/lib/types.nix index d0a8e96149d..31ce440bcb4 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 {