nix-dhall
provides infrastructure to drive Nix using
Dhall expressions. This repository provides the core
primitives, namely:
-
dhall/Nix/derivation.dhall
provides a function to create Nix derivations. -
dhall/Nix/fetchurl.dhall
provides a function to create Nix derivations that fetch a specified URL. -
nix/nix-dhall.nix
provides a top-level expression that transformsnix-dhall
Dhall expressions to Nix forms that can be used withnix-build
, etc.
-
To use
nix-dhall
, write a Dhall expression of typeDerivation
. -
Next, compile this Dhall expression into a Nix expression with
dhall-to-nix
:dhall-to-nix <<< './your-expression.dhall' > your-expression.nix
-
Build the resulting Nix file using
nix-dhall.nix
:nix-build -E 'import ./nix/nix-dhall.nix (import ./your-expression.nix)'