glistix/nix/derivation

Types and functions related to Nix derivations.

Types

A derivation’s builder program, and the args to call it with. Not to be confused with the DerivationBuilder type.

pub type Builder {
  Builder(path: PathLike, args: List(String))
}

Constructors

  • Builder(path: PathLike, args: List(String))

A derivation in Nix is a special attribute set with building information as well as where it is to be stored in the Nix store.

pub type Derivation

Functions

pub fn from_attrset(attrset: AttrSet(a)) -> Derivation

Converts an attribute set, which is assumed to be a derivation already, to a derivation. If it is not a derivation, it will be cast into one (that is, it will receive the type: "derivation" attribute).

pub fn new(
  named name: String,
  on system: System,
  using builder: Builder,
) -> Derivation

Creates a new derivation. Use a DerivationBuilder to specify more options.

Please refer to the NixOS manual, at https://nixos.org/manual/nix/stable/language/derivations, to learn more about these options.

Search Document