[Nix-dev] How can we test changes before pushing them to master?

Vladimír Čunát vcunat at gmail.com
Tue Jul 24 22:00:38 CEST 2012


On 24 July 2012 21:46, Eelco Dolstra <eelco.dolstra at logicblox.com> wrote:
>> Perhaps other people already have similar scripts or workflows or
>> ideas of how we could go about this?
>
> Maybe something like:
>
> $ nix-env -f . -qaP \* --drv-path | sort > l1
> (...modify package...)
> $ nix-env -f . -qaP \* --drv-path | sort > l2
> $ changed=$(diff l1 l2 | awk '{print $2}' | sort | uniq)
> $ nix-build $(for i in $changed; do echo -A $i; done)

Yes, true, it can be as easy as this.
I would only have rather "changed=$(comm -2 I1 I2)", it seems cleaner.


Vlada


More information about the nix-dev mailing list