query
On this page

isDerivation

lib.isDerivation

Docs pulled from | This Revision | about 2 hours 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
(lib.attrsets.isDerivation)

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

isDerivation =
    value: value.type or null == "derivation";