Tweag + Nix dev update #27

Hi everyone, some news from the Tweag Nix team. This was a rather cool period on surface (heck, I don’t even have a cool new feature to make a pretty gif of), but there are some nice under-the-hood changes going on.

Nix internals

  • @edolstra added a new store method to build a path and return its resulting outputs. This simplifies a lot of code that used to run a build, and then query the db for the newly built outputs (which was both cumbersome and fragile). It incidentally fixes an old issue causing remote builds to (occasionnally) fail with content-addressed derivations (nix#6221, nix#6311);
  • Internally, the Nix derivations are indexed by an identifier called the hash modulo. This hash modulo was represented in a convoluted way, so @thufschmitt drastically simplified it (nix#6268);
  • @edolstra just merged a PR adding support for impure derivations (nix#6227).

Nix UX

  • @edolstra fixed an issue causing nix build to print more outputs than needed (nix#6311);
  • @edolstra changed the registering of the experimental builtin functions so that they don’t appear at all if the experimental feature is not enabled (nix#6314);
  • @edolstra added a new (experimental) builtin to fetch a whole closure from a binary cache at eval-time. This also provides an alternative to builtins.storePath that works in pure eval mode. (nix#6302);
  • @thufschmitt started fixing an issue causing Nix to fail in some specific containers setup because of an OverlayFS quirk (nix#6280).

Content-addressed derivations

Documentation

These past weeks saw a nice effort in terms of documentation, with

Nickel-nix interoperability

Following the first release of Nickel, @yannham @garbas and @thufschmitt had published a proof-of-concept of a library enabling Nickel to build Nix derivations (here).
This POC is quite hacky, so @yannham and @thufschmitt started brainstorming to build a nicer story around that… more to come later.


ANd that’s all, folks

16 Likes