[Nix-dev] Updating /etc/nix/nix.conf before building packages during nixos-rebuild
Mateusz Kowalczyk
fuuzetsu at fuuzetsu.co.uk
Fri May 23 03:50:01 CEST 2014
Hi,
I saw that Hydra built some packages that I want already, for example Qt
4.8.6. I need that and it takes a very long time (and usually OOMs) on
my machine so I thought, hey, why not just fetch it from Hydra.
I found binaryCaches option but it is set in /etc/nix/nix.conf that's
generated from /etc/nixos/configuration.nix.
The problem is that even if I set nix.binaryCaches = [ … ]; in my
configuration.nix, it won't get applied until after the rebuild. Namely,
nixos-rebuild wants to build Qt (and many others) itself, so it's not
looking at the binary cache first.
Is there a way to cheat it and generate nix.conf first and only then
calculate which packages we can fetch and which we have to build?
Notably, manually running
nix-install-package --non-interactive --url
http://hydra.nixos.org/build/11188799/nix/pkg/qt-4.8.6-i686-linux.nixpkg
installs Qt fine and nixos-rebuild no longer wants to build it itself.
That's great but there are many packages and I can't try to find each on
Hydra by hand.
--
Mateusz K.
More information about the nix-dev
mailing list