isDerivation
lib.isDerivation
Docs pulled from | This Revision | 13 minutes ago
Check whether the argument is a derivation. Any set with
{ type = "derivation"; }
counts as a derivation.
Inputs
value
-
Value to check.
Type
isDerivation :: Any -> Bool
Examples
lib.attrsets.isDerivation
usage example
nixpkgs = import <nixpkgs> {}
isDerivation nixpkgs.ruby
=> true
isDerivation "foobar"
=> false
Noogle detected
Implementation
The following is the current implementation of this function.
isDerivation =
value: value.type or null == "derivation";