From 264e66f69699919f1040be2986b91fd6b188e9af Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 30 Aug 2018 17:10:28 +0200 Subject: [PATCH] Add simple test for nix upgrade-nix --- release.nix | 12 ++++++++++++ src/nix/upgrade-nix.cc | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/release.nix b/release.nix index f9ee07e34..fdf3fa946 100644 --- a/release.nix +++ b/release.nix @@ -249,6 +249,18 @@ let su - alice -c '_NIX_INSTALLER_TEST=1 ./nix-*/install' su - alice -c 'nix-store --verify' su - alice -c 'PAGER= nix-store -qR ${build.x86_64-linux}' + + # Check whether 'nix upgrade-nix' works. + (! [ -L /nix/var/nix/profiles/per-user/alice/profile-2-link ]) + cat > /tmp/paths.nix < store) { // FIXME: use nixos.org? - auto req = DownloadRequest("https://github.com/NixOS/nixpkgs/raw/master/nixos/modules/installer/tools/nix-fallback-paths.nix"); + auto req = DownloadRequest(storePathsUrl); auto res = getDownloader()->download(req); auto state = std::make_unique(Strings(), store);