[Nix-dev] How to actually get rid of things from the nix-env -qs list?

aszlig aszlig at redmoonstudios.org
Mon Apr 28 11:34:33 CEST 2014


On Mon, Apr 28, 2014 at 09:38:41AM +0000, Mateusz Kowalczyk wrote:
> Well, I managed to install the software with both 2.7 and 3.3 but I have
> no idea which one is active at the moment. I also don't know how to get
> rid of 2.7 from my -qs list which I don't care about: I only wanted to
> test that it worked when writing the package. How can I do this? Is
> nix-env -i a bad way to test these things?

It's one of many ways, but in this case I'd recommend to use something
like:

for pyver in 27 33; do
  nix-build -o "py${pyver}foo" -A "python${pyver}Packages.foo"
done

... while being in a cloned nixpkgs directory. You can also reference
the path to <nixpkgs> directly by just passing it to the nix-build
command (default.nix is used by default if no specific file is given).

Using this way you don't need to actually "install" anything into your
env and can test and rebuild as you need without the annoying
install/remove cycle.

But again, that's just one of many ways of how you can do that.

a!
-- 
aszlig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: Digital signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140428/b4517347/attachment.bin 


More information about the nix-dev mailing list