Nix as Make

Haskell has an excellent 2D graphics library called diagrams. Its website begins with an short example that produces the repeating pattern (called a “Hilbert curve”) displayed in the page header.

The objective of our demonstration will be to:

  1. Download this code;
  2. Run it, producing a vector image; and
  3. Convert the result to a PNG file.

First we’ll do this in a traditional fashion using Make, and then we’ll rewrite it using Nix.

Sign up for access to the full page, plus the complete archive and all the latest content.