[Nix-dev] two versions of emacs installed
Eelco Dolstra
e.dolstra at tudelft.nl
Tue Jul 13 11:58:20 CEST 2010
Hi,
On 07/10/2010 05:04 PM, Bryan Murdock wrote:
> The most intriguing feature of nixos for me is being able to have
> multiple versions of the same software installed. I just got nixos
> running as a virtualbox guest and that's the first thing I tried and
> it didn't work. I installed emacs 23:
>
> nix-env -i emacs-23.2
>
> and that worked just fine. Then I tried to install emacs 22:
>
> nix-env --preserve-installed -i emacs-22.3
>
> But I got errors:
>
> Collission between
> '/nix/store/sdfx8jya9ijci7d7xm70fk7wv8zw5z3v-emacs-22.3/bin/b2m' and
> '/nix/store/nhkyz3ls880i21319wmr17qyrgzzmn98-emacs-23.2/bin/b2m'.
> Suggested solution: use 'nix-env --set-flag priority NUMBER PKGNAME'
> to change the priority of one of the conflicting packages.
Packages have a numerical priority to resolve conflicts between file names. The
default priority is 5, and higher values denote a lower priority. So this will
work:
$ nix-env -i emacs-22.3
$ nix-env --set-flag priority 10 emacs
$ nix-env -i emacs-23.2
You'll now have both Emacs versions in the profile, with Emacs 23.2 as the default.
An alternative is to install different versions in different profiles. For example:
$ nix-env -p emacs-test -i emacs-23.2
$ ./emacs-test/bin/emacs
--
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
More information about the nix-dev
mailing list