Hey Richard,

Richard Ipsum <richardip...@fastmail.co.uk> writes:

> On Tue, Feb 14, 2017 at 11:29:32AM +0100, Freddy Rietdijk wrote:

> Out of interest can I ask what the rationale for that decision is?
>
> I'd like to try to persuade you not to symlink python to python3,
> because doing so potentially breaks existing python2 programs.

Please note that the situation in NixOS is a bit different to other
distributions. You almost never have python installed globally. All
packaged programs refer to one *specific* instance of python of their
choosing and it's only availale for themself, not anywhere else.

For example, if you install program A which depends on python3, and
another program B which depends on python2, they will happily work, but
your system *won't* have neither `python2` nor `python3` nor `python` in
PATH. 

The only situation that will change is if a package depends on (or a
user installs) "python" instead of either "python3" or "python2". This
is then easily fixed by choosing the correct one.

Also note that it's generally discouraged to "globally" install a
package for development needs. Instead of globally installing python3,
firefox and gdb you write a `shell.nix` file in the project directory,
run `nix-shell`, and you will get dropped into a shell with the
mentioned packages available, *without* having to install anything of it
in a global. Other packages (and even your whole system outside that
shell) is unaffected.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to