[Nix-dev] How to upgrade when Nix is too old to evaluate nixpkgs

Bjørn Forsman bjorn.forsman at gmail.com
Thu Jun 30 21:06:46 CEST 2016


On 30 June 2016 at 17:38, Bjørn Forsman <bjorn.forsman at gmail.com> wrote:
> On 30 June 2016 at 17:15, Vladimír Čunát <vcunat at gmail.com> wrote:
>> On 06/30/2016 05:10 PM, Bjørn Forsman wrote:
>>> The problem is that none of the build artifacts can be downloaded!
>>
>> Hydra no longer has the binaries AFAIK, but they're in the cache, so
>> nix-store --realize /nix/store/foo should work.
>
> Thanks. This worked:
>
>   nix-store --realize /nix/store/path-to-nix-11.2-found-on-hydra
>   nix-env -i /nix/store/path-to-nix-11.2-found-on-hydra
>   sudo nixos-rebuild switch

Well... almost. Building went fine, but when switching to the new configuration:

$ sudo nixos-rebuild switch
...
building the system configuration...
updating GRUB 2 menu...
Can't exec "systemd-escape": No such file or directory at
/nix/var/nix/profiles/system/bin/switch-to-configuration line 264.
Unable to escape /!

I'll try to make a PR to lock down that call systemd-escape with an
absolute (nix store) path. If nobody beats me to it.

- Bjørn


More information about the nix-dev mailing list