Merge pull request #163458 from NixOS/lib-isDerivation-simplify
lib.isDerivation: Simplify
This commit is contained in:
commit
f02a438ae4
1 changed files with 1 additions and 1 deletions
|
@ -327,7 +327,7 @@ rec {
|
||||||
isDerivation "foobar"
|
isDerivation "foobar"
|
||||||
=> false
|
=> false
|
||||||
*/
|
*/
|
||||||
isDerivation = x: isAttrs x && x ? type && x.type == "derivation";
|
isDerivation = x: x.type or null == "derivation";
|
||||||
|
|
||||||
/* Converts a store path to a fake derivation. */
|
/* Converts a store path to a fake derivation. */
|
||||||
toDerivation = path:
|
toDerivation = path:
|
||||||
|
|
Loading…
Reference in a new issue