Nix derivations

A Nixᛦ expression which describes a build action is called a derivation. The result (since a derivation is a function) of a derivation is an object in the Nix storeᛦ.

Derivations are constructed using stdenv.mkDerivation as in Hello, Nix!ᛦ

Minimal attributes

  • name - default value is ${pname}-${version}
  • pname - package name
  • version - version string
  • src - result of a source fetching function like fetchurl or fetchgit

Common optional attributes

  • builder - a Nix builder scriptᛦ describing the build process for the package (defaults to configure; make; make install)