[Nix-dev] Build a package with what I have right now without updating deps

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Tue May 27 01:52:52 CEST 2014


Hi,

Often I want to package some software. Normally what I do is bring my
nixpkgs checkout up to date, create a new branch from master and write
the expression.

My problem begins when I set out to try my expression out: if I run
nix-env -i <my package> then nix will go out and try to pull in all the
latest versions of packages as my tree was updated. While technically
that's great and it ensures that my expression builds against what's in
master right now, it's very inconvenient during development of the
expression itself.

My specific example is that I'm writing an expression which depends on
Qt4 at the moment so when I try to test it, it goes off to try and build
qt4 first (which seems to have been updated somehow). The problem with
this is that qt4 takes many, many hours to build if it builds at all so
I'm currently stuck waiting either for my box to finish building Qt or
for Hydra to finish building it in about 2-3 hours so I can fetch it.
This wait is rather sub-optimal if all I care about is ‘does this
expression build with my current setup?’. If I'm trying to quickly
package something so I can use it 5 minutes later, it's often impossible.

How can I ask nix to use the packages I already have installed where
possible? I'd rather leave testing of whether it works with current
nixpkgs master for later, when I think I'm done writing the expression.

Thanks

-- 
Mateusz K.


More information about the nix-dev mailing list