TLDR
Why is Nix better than Conda?
Background
I’ll be giving a short presentation about Nix, to an audience of scientists who have to dabble in programming. By ‘dabble’ I mean that programming is a crucial part of their day jobs, but nevertheless tends to be viewed as a necessary evil that gets in the way of getting on with real science; as such establishing good programming/development practices/environments (which would pay off handsomely in the long run) can be viewed as a waste of precious time and effort. In this context, some might see Nix as a pointlessly esoteric self-aggrandising exercise by IT people, which has little relevance to their goals of doing science, and would only complicate their lives unnecessarily.
The purpose of the presentation is to get them to consider using Nix instead of Conda, which they have been using (wrapped in ad-hoc shell scripts) to automate installation of a fair subset of the software they use and write.
I would like to be able to enunciate a cogent answer to the hypothetical question:
Conda works fine, why should we swap this for Nix (which I can’t even install on HPC clusters)?
But I also want it to be a fair comparison, and genuine exploration of whether or not using Nix would be beneficial.
Without going into any details whatsoever, here are, very broadly, the main advantages of the two sides, as I see them
Pro Conda:
- Easier installation, without need for admin privileges
- Better support for macOS and Windows (My audience cares not one hoot about Windows, but macOS is important.)
- Easier for non-experts
Pro Nix:
- More robust
- Better reproducibility
- More general
My fear is that the pro-Conda points are high-level and easily appreciated by people for whom computers are a necessary evil, while their eyes are likely to glaze over during explanations of the pro-Nix points.
-
I find the
direnv
/nix-shell
combination amazingly helpful. An important, and perhaps easily overlooked part of this, is that a checkout of an older version of a project, automatically switches the dependencies to those used with that version. This is vital when trying to reproduce or verify older results. Does something equivalent (and equally robust) exist for Conda? -
They need to run their code on High Performance Computing hardware on which they don’t have admin rights. This throws a huge spanner in the works for Nix. I know that there are various possible workarounds, but the issue simply doesn’t arise in Conda.
-
I seem to recall that Conda is inspired by Nix, but I couldn’t find a reference to it in a quick search. (Just a curiosity, probably not useful as a persuasive argument.)
Anyway, that’s the context in which I’m asking the questions: Is Nix better than Conda? Why?