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

Roger Qiu roger.qiu at matrix.ai
Wed Aug 3 15:53:57 CEST 2016


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 of the names, and then create your name alias to the non-named
package. However I do not know how this can be done.

Another solution is to do package overrides.
On 03/08/2016 11:46 PM, "Roland Koebler" <rk-list at simple-is-better.org>
wrote:

> 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
>   # (since I would like both versions for testing).
>
>   $ nix-env -i python3-3.4.5
>   installing ‘python3-3.4.5’
>   ...
>
>   $ nix-env -i python3-3.5.2
>   replacing old ‘python3-3.4.5’
>   installing ‘python3-3.5.2’
>
>   So, this did not work. When trying to install both at once, it also
> fails:
>
>   $ nix-env -i python3-3.4.5 python3-3.5.2
>   replacing old ‘python3-3.5.2’
>   installing ‘python3-3.4.5’
>   installing ‘python3-3.5.2’
>   building path(s)
> ‘/nix/store/r1ickgl36b4374zl8nlqfc25qnlr4lga-user-environment’
>   Wide character in die at /nix/store/
> 64jc9gd2rkbgdb4yjx3nrgc91bpjj5ky-buildenv.pl line 79.
>   collision between
> ‘/nix/store/zg1f3g03v8i1pnr1hvm5mj285jwzr1ri-python3-3.4.5/bin/2to3’ and
> ‘/nix/store/06af6d830iawf
>   builder for
> ‘/nix/store/sz3pbwznp8q59ggbqm15wilsa8n9jnph-user-environment.drv’ failed
> with exit code 255
>   error: build of
> ‘/nix/store/sz3pbwznp8q59ggbqm15wilsa8n9jnph-user-environment.drv’ failed
>
>   The given hint also doesn't work:
>
>   $ nix-env --set-flag priority 10 python3-3.5.2
>   setting flag on ‘python3-3.5.2’
>   ...
>   $ nix-env -i python3-3.4.5 python3-3.5.2
>   replacing old ‘python3-3.5.2’
>   installing ‘python3-3.4.5’
>   installing ‘python3-3.5.2’
>   ...
>   (same output as above)
>
>
> So, how could I install both?
> (It's clear that python3 could only point to one, but I'm happy with
> using them as python3.4 and python3.5.)
>
>
> One additional question: When I install an already installed package,
> no action should be necessary. But the following happens. Why?
>
>   $ nix-env -i python3-3.5.2
>   replacing old ‘python3-3.5.2’
>   installing ‘python3-3.5.2’
>
>
> thanks
> Roland
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160803/499dc1d4/attachment.html>


More information about the nix-dev mailing list