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.
wip/yesman
sternenseemann 3 years ago
parent 99de33bb1d
commit 8a83d611f5
  1. 2
      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 {

Loading…
Cancel
Save