3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
sternenseemann 2021-04-26 20:42:19 +02:00
parent 99de33bb1d
commit 8a83d611f5

View file

@ -337,7 +337,7 @@ rec {
};
shellPackage = package // {
check = x: (package.check x) && (hasAttr "shellPath" x);
check = x: isDerivation x && hasAttr "shellPath" x;
};
path = mkOptionType {