Get the latest tech news
Nix Derivations, Without Guessing
I went on a little low-level Nix adventure yesterday and early this morning because of this excellent blog post. In it, Farid builds up the simplest possible Nix derivation—making a file that has the contents “hello world”. Here’s what I like about it:
It’s kind of like a Make recipe or a shell script except all of its inputs and outputs refer to well-known long paths in/nix/store. So after some digging and re-reading Farid’s post, apparently ATerm is an old(er) configuration language that looks kind of like building OCaml variants. Combine the inner-digest with some other fields like the derivation’s name and call that the fingerprint Hash that, take the first 20 bits, and take the base32 representation of that
Or read this on Hacker News