Overriding the Nix 2.26 componentized build

Question for the Nix team:

When overriding the nix package in Nixpkgs to point to a specific point release, for versions <= 2.25.* I would do this:

nixVersions.nix_2_xx.overrideAttrs (oldAttrs: {
  version = specificVersion;
  src = oldAttrs.src.override {
    rev = specificVersion;
    hash = specificHash;
  };
})

In nix_2_26, there is no more src attribute, due to the restructuring of the build. What should I do instead with that version?

2 Likes

Relevant: Packaging: support for patching the `nix` package · Issue #12472 · NixOS/nix · GitHub

1 Like