Hey everyone, a new update from the Tweag Nix team (long overdue since the previous one was nearly a month ago. But Christmas came, and a baby − not the Christmas one, another − and I found myself… busy).
Flakes
- A common pain for Flake users is that when working on a local flake, Nix would always start by copying the flake contents to the store, which can take a non-trivial amount of time (so that people often end-up falling back to “standard” evaluation when hacking on big repos like nixpkgs). This also caused a number of small user experience issues, like #5425 or #4507.
@edolstra started changing the evaluation model to remove the need for this first copy but instead filter on-the-fly the files that shouldn’t be picked up (e.g. files ignored/unknown to the vcs system, files ignored by a.flakeignore
if the related proposal gets accepted, etc…) - A nice thing with Flakes and the new CLI is that there’s now a notion of “project” for Nix.
@balsoft and @Ravendii helped @tomberek take advantage of that to make Nix commands transparently do what you want when ran from a subdirectory of a flake (nix#5720, fixing nix#4612)
Nix Docker image
@garbas finished the migration of the Nix docker image from the NixOS/docker repository to NixOS/nix. This should make it easier (well, automatic) to get up-to-date docker images for new Nix releases.
He also took the opportunity to switch the build of the docker image from a plain old Dockerfile
to pkgs.dockerTools
(nix#5453). The context for this is explained in the parent pull-request: docker#31
Linked to that (and an other motivation thereof), it was discovered that Nix 2.5 wasn’t working properly inside a docker image (nix#5777). @edolstra fixed this in nix#5787 and released a 2.5.1 bugfix release.
This new docker image is now referenced as one of the official ways of installing Nix on the new download page (see below)
NixOS webpage
@garbas wrote or merged a number of small fixes to https://nixos.org (nixos-homepage#788, nixos-homepage#787, nixos-homepage#786, nixos-homepage#785, nixos-homepage#773, nixos-homepage#724, nixos-homepage#769, nixos-homepage#658)
He also re-vamped the download page by including some materials from https://nix.dev (nixos-homepage#780)
Performances improvements
@pennae (not from Tweag) demonstrated some wonderful skills in performance C++ programming by tweaking the evaluator code to squeeze a lot small performance issues (nix#5809, nix#5812, nix#5813, nix#5830, nix#5865, nix#5887, nix#5906). @edolstra and regnat spent a fair amount of time carefully reviewing this stream of really pleasant (but demanding) contributions, so that a number of them are now merged and several others are about to.
Misc
Removing the affinity hack
An old Nix issue (nix#3345) was reporting that using nix-shell
on a Nix expression involving import-from-derivation was causing the shell to only see one CPU.
This was because the Nix evaluator was temporarily switching itself to always run on the same CPU as the daemon for performance reasons, but the “temporarily” bit was broken when IFD was added to the mix.
While looking at it, @edolstra noticed that the issue wasn’t present on master anymore. More investigations showed that this was because the “stick to one CPU” logic was broken… but that it didn’t have any performance impact anymore.
As a result, he simply removed all that logic, which definitely fixed the issue and cleaned the code (nix#5821)
nix copy logs
@edolstra added a new command to copy the build logs from one machine to another (nix#5929, fixing nix#5222). This feature was sponsored by Flox.
UX tweaks
- @balsoft made it possible to show the stack trace in the repl (nix#5840)
-
@balsoft with Tomberek worked towards making the
nix
output more useful in non-interactive settings (nix#5918) - Regnat fixed a small glitch here
nix why-depends
was eating the first line of output (nix#5914)
Bugfixes
-
@yorickVP fixed a small performance issue when loading a big attr set in
nix repl
(nix#5835) - @balsoft fixed an internal incoherence causing different Nix commands to generate a different lockfile (nix#5839)
Nickel
Nickel didn’t see a lot of groundbreaking changes during this period. That’s because @yannham and @aspiwack have been working hard gathering and digesting feedback to freeze an infinity of small (or big for that matter) details before a first release. The bulk of the work is referenced from nickel#462
This didn’t mean of course that nothing was done (the git log speaks for itself on that). Most notably:
- Ysndr kept making the language server more precise and awesome
- Francois-caddet worked on pattern destructuring, so that one can write
let {x, y} = foo in bar
orfun { x, y } => foo
- Litchipi hacked around the typechecker to both extend it and fix some minor issues
And that’s all, folks