Add 'nix upgrade-nix' command

This command upgrades Nix to the latest stable version by installing a
store path obtained from

  https://github.com/NixOS/nixpkgs/raw/master/nixos/modules/installer/tools/nix-fallback-paths.nix

which is the same store path that the installer at
https://nixos.org/nix/install.sh uses.

The upgrade fails if Nix is not installed in a profile (e.g. on NixOS,
or when installed outside of the Nix store).
This commit is contained in:
Eelco Dolstra 2018-01-31 16:14:47 +01:00
parent 8af911be5c
commit 6fa690291a
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 142 additions and 1 deletions

View file

@ -5,6 +5,8 @@
namespace nix {
extern std::string programPath;
struct Value;
class Bindings;
class EvalState;