Hmmm - nix-build also has --run-env which makes a temporary environment but
is listed in the source as obsolete. I wonder what the "correct" way is,
nix-shell doesn't build your derivation.

https://github.com/NixOS/nix/blob/2b6c8ef40121fdc418551e9b780bb909477c9a3c/scripts/nix-build.in#L196

Wout.


On Mon, Apr 28, 2014 at 11:34 AM, aszlig <asz...@redmoonstudios.org> wrote:

> 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
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iF4EAREIAAYFAlNeIKkACgkQ0OvQ7IwtyWGioQEAuekFM8bahTUQll6iI45Dp19h
> RkbtXBMsBTfwSoJpJWgA/29BO//PN8Ym9rYKSQHtiX/j9S1VaW186p63tYT/eY3G
> =9fzF
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to