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
-
@thufschmitt fixed
nix build --dry-run
(nix#6277); - @thufschmitt started re-wiring the Hydra support for ca-derivations: There is an old PR to that effect (hydra#875), but it is very messy, and adding a lot of complexity to existing code. Therefore he tried restricting the scope of the PR, and refactoring things by the way (Split the `buildRemote` function by thufschmitt · Pull Request #1180 · NixOS/hydra · GitHub).
Documentation
These past weeks saw a nice effort in terms of documentation, with
-
@infinisil documenting the mysterious (but useful)
_module.args
NixOS option (nixpkgs#165540); - @fricklerhandwerk collaborating with @Ericson2314 (from Obsidian Systems) on documenting Nix design and architecture (https://github.com/NixOS/nix/pull/4280#pullrequestreview-915609250).
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