Re: [Nix-dev] multiple versions of the same software? / collisions

2016-08-12 Thread Guillaume Maudoux (Layus)
Hi, Here is a working example with nix-env : nix-env -i $(nix-build --expr 'with import {}; pkgs.buildEnv { name = "pythons"; ignoreCollisions = true; paths = [ pkgs.python34 pkgs.python35 ]; }') or, to pick the prioritized python version (change the priority value if needed; prioritizing

Re: [Nix-dev] multiple versions of the same software? / collisions

2016-08-04 Thread Freddy Rietdijk
A method to have access to all interpreters is to create a derivation that has symbolic links to each of the interpreters and install that one. But as has been said before nix-shell is the recommended method. On Thu, Aug 4, 2016 at 2:13 PM, Rok Garbas wrote: > for the python

Re: [Nix-dev] multiple versions of the same software? / collisions

2016-08-04 Thread Rok Garbas
for the python development don't use nix-env but create per project default.nix scripts and use nix-shell. make sure you read the python section in nixpkgs manual -> http://nixos.org/nixpkgs/manual/ if you're looking to generate nix expressions from requirements.txt checkout pypi2nix ->

Re: [Nix-dev] multiple versions of the same software? / collisions

2016-08-04 Thread Roger Qiu
That's a problem though, there shouldn't be much of a problem of having both versions of the package available in a single environment, as long as the second package is namespaced appropriately, in this case it's just a shell alias. This should be possible with Nix. There are situations where

Re: [Nix-dev] multiple versions of the same software? / collisions

2016-08-04 Thread Guillaume Maudoux (Layus)
Hi, I think you are putting your efforts in the wrong direction. Nix is not designed to install both python 3.4 and 3.5 in the same environment. What it can do however is cache both in the store, so you can get an environment with python 3.4 with nix-shell -p python34 and an environment with

Re: [Nix-dev] multiple versions of the same software? / collisions

2016-08-04 Thread Daniel Hlynskyi
I can be mistaken, but nix-env dash-splits name to get name without version, and uses it to upgrade or sideinstall into environment. This works bad for python, because python34 and python35 are separate expressions, treated as one in nix-env. You can override the name of package in

Re: [Nix-dev] multiple versions of the same software? / collisions

2016-08-03 Thread Roland Koebler
Hi, I think I've now found out (at least partially), although this could result in a package being installed multiple times. > It appears that the flag setting only works on already installed packages. Yes, and if I use $ nix-env -i python3-3.5.2 ... $ nix-env --set-flag priority

Re: [Nix-dev] multiple versions of the same software? / collisions

2016-08-03 Thread Roger Qiu
It appears that the flag setting only works on already installed packages. Also https://mobile.twitter.com/NixOsTips/status/488789048471719936 Also I'm not sure, but even if there are name collisions in the user environment, it should still be possible to install both packages but only use one

[Nix-dev] multiple versions of the same software? / collisions

2016-08-03 Thread Roland Koebler
Hi, I'm using Nix on Debian 8, and tried to install both Python 3.4 and 3.5 via Nix, which did not work, since one always replaced the other. So: How does Nix determine if one package should replace an other? And how could I prevent this? Example: # Trying to install both Python 3.4 and 3.5