mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
stdenv: use lib.isX instead of typeOf Y == X
more readable
This commit is contained in:
parent
3cd360a2de
commit
ac031478cb
@ -214,7 +214,7 @@ let
|
|||||||
|
|
||||||
checkDependencyList = checkDependencyList' [];
|
checkDependencyList = checkDependencyList' [];
|
||||||
checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
|
checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
|
||||||
if lib.isDerivation dep || dep == null || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep
|
if lib.isDerivation dep || dep == null || builtins.isString dep || builtins.isPath dep then dep
|
||||||
else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep
|
else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep
|
||||||
else throw "Dependency is not of a valid type: ${lib.concatMapStrings (ix: "element ${toString ix} of ") ([index] ++ positions)}${name} for ${attrs.name or attrs.pname}");
|
else throw "Dependency is not of a valid type: ${lib.concatMapStrings (ix: "element ${toString ix} of ") ([index] ++ positions)}${name} for ${attrs.name or attrs.pname}");
|
||||||
in if builtins.length erroneousHardeningFlags != 0
|
in if builtins.length erroneousHardeningFlags != 0
|
||||||
|
Loading…
Reference in New Issue
Block a user