Using a systems package manager vs. a specific version manager

I prefer not to have erlang/elixir installed through the OS package manager on my workstation (dependency hell). Instead I add the necessary support packages (eg wx-dev or whatever it is) and then let kerl handle installing erlang and kiex handle installing elixir.

1 Like

How different the point of view can be… I prefer to have nothing installed by something else than my package manager, since only this way I can ensure, that I won’t get into trouble because mixed pathes or other stuff. I never got into dependency hell that way. I only got into hell because there were multiple different versions of the same software installed and picking up runtime or libraries of another version.

Yes I had trouble because of outdated software, but that was before I switched to Funtoo. And if something isn’t available in a recent version, it is very easy to create a package for it. Only a handfull of lines of something similar to a bashscript.

For ruby, perl and many other languages there are even tools available that do convert gems, eggs and stuff into ebuilds (package format of Gentoo and Funtoo).

After I switched to Funtoo I haven’t had the desire to use a version manager for anything again. If I really need to check something with another version of some tool, I either use a docker container, a fresh VM or a chrooted environment, depending on the environment I will have that run later on. In most cases those environments are minimal, to ensure there is nothing disturbing the experiments. Also it can be automated easily when using docker.

My paths are clean, I promise! I use Debian because it’s what I’m most familiar with. For my workstation, it’s just about getting things to work - it’s never going to be a pure environment. Apt has given me problems the last few times I’ve tried to install erlang, so I install the support packages and use those version managers. I also like that I can see exactly where the binaries are ($ which be damned) and don’t mind checking my path to make sure things are OK. I put my good stuff in ~/.local/bin where I can check to see if there’s any bit rot :wink:

Using the version manager on my local machine is just a compromise so I can go to the dev environment. I TRAMP on in or forward ports so I can use observer.

I have fond memories of invoking emerge :). I want to have a perfect local environment, but I’ve just accepted the warts of my present one and 🤷


Just saying


I have heard one can use nix (the package manager) on every (or most at least) linux distributions, is this true? And how likely would such a scenario clash with native packages?

Also how good does nix clean dependencies away which aren’t needed anymore in that version? Comparing similar installed and configured Fedora, Ubuntu, and NixOS systems, how much more harddisk is needed by NixOS because of the possible different versions of dependencies?

How easy is it to have two different elixir versions available at the same time in a way that I can easily switch them out for each other in a project? Meaning that I can easily mix test and it will run with 1.4 or 1.3 depending on the current set version? Or is such a thing possible via pre/suffixing the cmd? How well are they shielded against each other? Mix puts pacakges usually into ~/.mix AFAIR.

How easy is the overall installation of a NixOS system compared to Fedora, Ubuntu, or Gentoo (No need to answer that last one ;))

Nix is somewhat broken right now for the BEAM ecosystem. The good news is that I have been working with some people to get it back on track. We are currently in the process of reorganizing the various BEAM interpreters so it is a little easier to package new BEAM interpreters in the future.

Admittedly all of that work has gone into Erlang so far, but I plan on doing the same for Elixir once we get Erlang in a good place. Someone else is also planning on fixing up the LFE build system.

To my knowledge, yes. At the very least, it works with the major linux distributions.

It should never clash with anything installed on your system. When you install a package through nix, it gets placed into /nix/store. It can then have a symlink into $HOME/.nix-profile.[quote=“NobbZ, post:5, topic:6188”]
Also how good does nix clean dependencies away which aren’t needed anymore in that version? Comparing similar installed and configured Fedora, Ubuntu, and NixOS systems, how much more harddisk is needed by NixOS because of the possible different versions of dependencies?

This is not an automatic process, every so often you will need to run nix-collect-garbage, you can add -d to automatically delete old versions of any package that is no longer in use. As for disk space, that is somewhat hard to answer. I think it largely depends on which applications you are installing and how many versions you have. Someone in #nixos on Freenode may know more.

Right now this is not so easy. This is part of the cleanup I am involved with. As it stands, you can only install a single elixir version. I am hoping to setup something so that you can install most elixir versions (at least ones that are currently maintained). So something like $ nix-env -i elixir which currently works, but always installs the most recent version. I want to make it so you can also install elixir-1.4, elixir-1.3, etc. This would allow you to have any number of elixir versions on your machine that you can use per project.

Unfortunately, this still is not exactly an easy process. I am not sure how much work is being done surrounding this. You can take a look through the current documentation for how to install, but the TL;DR is that you can boot using a live CD and format the drive(s) you want to use and install manually (fdisk, mkfs.ext4, etc). While it is not particularly hard it isn’t as smooth as it probably could be.

If it makes a difference, I am on OSX and have been slowly migrating away from homebrew in favour of Nix. When I started this process I installed any new packages I needed using Nix, and have been slowly uninstalling packages from homebrew and replacing them with their Nix counterpart.


@Ankhers Ooo, I look forward to those updates!! :smiley:

Once we have gotten a little further with this process, I will make sure to post something on the forums explaining how things should be working and how you can take advantage of Nix with your BEAM projects.

In the interim, if anyone has any questions, feel free to PM me. I’m not sure if Nix should hijack this thread. Feel free to also find me on Freenode.

1 Like