The most important built-in function is derivation, which is used to describe a single derivation (a build task). It takes as input a set, the attributes of which specify the inputs of the build.

The function mkDerivation in the Nixpkgs standard environment is a wrapper around derivation that adds a default value for system and always uses Bash as the builder, to which the supplied builder is passed as a command-line argument. See the Nixpkgs manual for details.

The builder is executed as follows: