Skip to content

Commit

Permalink
nixStatic: set derivation pname to "nix-static"
Browse files Browse the repository at this point in the history
This is a workaround for the issue a lot of people have been having
where nix-env -u would think that nixStatic was a newer version of nix
and “upgrade” it to that package, breaking setups in the process.

Reference #118481
  • Loading branch information
sternenseemann committed Apr 13, 2021
1 parent 74df3bb commit efbb241
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29752,7 +29752,14 @@ in
nixUnstable
nixFlakes;

nixStatic = pkgsStatic.nix;
nixStatic = pkgsStatic.nix.overrideAttrs (attrs: rec {
# workaround: make sure that the derivation's name is
# not too similar to pkgs.nix, so nix-env -u doesn't
# interpret the host suffix of nixStatic as a newer
# version than 2.3.10 and “upgrade” nix to nixStatic,
# breaking users' setups in the process.
pname = "nix-static";
});

nixops = callPackage ../tools/package-management/nixops { };

Expand Down

0 comments on commit efbb241

Please sign in to comment.