default.nix: say which old Nix version is being used

We are hitting a long tail of problems at work related to old nix-direnv
sneaking old nix versions in that would be fixed by
https://github.com/nix-community/nix-direnv/pull/513, except that the
issue is that nix-direnv itself is too old.

It would at least be very helpful to print out *what* ancient nix
version is at fault.
This commit is contained in:
Jade Lovelace
2025-08-20 15:23:04 -07:00
parent 8452e9a2d5
commit 6e0313d24e

View File

@@ -6,7 +6,8 @@ if !builtins ? nixVersion || builtins.compareVersions requiredVersion builtins.n
abort ''
This version of Nixpkgs requires Nix >= ${requiredVersion}, please upgrade:
This version of Nixpkgs requires Nix >= ${requiredVersion} but it is being
evaluated with Nix ${builtins.nixVersion or "(too old to know)"}, please upgrade:
- If you are running NixOS, `nixos-rebuild' can be used to upgrade your system.