Ditch Your Version Manager

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • nixpkgs

    Nix Packages collection & NixOS

    > Arguments for 2:

    > - What if rvm or nvm don't have a specific version

    Let's get back to reality for a second. For most development needs this is a hypothetical situation.

    Right now, in reality, ruby-lang hosts versions dating to 2002.

    Also, right now, in reality nix limits the number of available versions. Quote: "in NixPkgs we choose to restrict the number of maintained versions", https://github.com/NixOS/nixpkgs/issues/93327#issuecomment-6... So it's already worse than the hypothetical "what if rvm don't have a specific version".

    Also, right now, in reality there's no easy way to pin a version of a tool in nix. Except going to a third-party website (lazamar's site), hope that your specific version is listed there (he only maintains a snapshot of a few years), and dig through nixpckg commit hashes. And this has been a known issue for as long as nix has been around. 18 years, at least. And we're still hoping that someone somewhere will incorporate this into standard tooling. You yourself linked to an issue on this.

    I'd like to link to a reply in that issue: https://github.com/NixOS/nixpkgs/issues/93327#issuecomment-6...

    And to this reply: https://github.com/NixOS/nixpkgs/issues/93327#issuecomment-7...

    > What are you going to do for other languages which don't have a package/VM manager like Java, C/C++, etc?

    That varies between languages, of course. I have several Java versions installed side-by-side. C/C++ is worse because they are mostly stuck in 1960s, tooling-wise (though on windows you can have multiple msvcrt versions installed side-by-side).

    This still can be (and is) handled. And nix doesn't offer great advantages, except providing a complex, complicated, poorly documented tool.

  • Nokogiri

    Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.

    Mike has worked hard over the years to have Nokogiri come with its dependencies. It does come with libxml and all that is required.

    From https://nokogiri.org

    > These dependencies are met by default by Nokogiri's packaged versions of the libxml2 and libxslt source code, but a configuration option --use-system-libraries is provided to allow specification of alternative library locations.

    Some authors work hard to have their tools do the right thing and consistently.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • nixery

    Container registry which transparently builds images using the Nix package manager. Canonical repository is https://cs.tvl.fyi/depot/-/tree/tools/nixery

  • asdf

    Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more

    As an alternative, I use asdf[0] which is written in bash. It allows you to manage versions of any package through plugins. Plugins can be written in any language (as long as they can be set to chmod +x). Most plugins are written in bash.

    Though there is a wealth of plugins, what's nice is that it's trivial to write your plugin. So if something doesn't exist yet, or you have some internal tool you need to version, it takes less than an hour to write a plugin.

    [0] https://asdf-vm.com/

  • niv

    Easy dependency management for Nix projects

    This... This is laughable. How do I install ruby 2.6.8? Oh, there's no ruby_2_6_8, because of course there isn't. And this could be difference between a secure system and all your base are belong to us.

    And they call this reproducible builds?

    And that's before getting into the ridiculous

    --- start quote ---

    All the software that we installed depends on the specific version of the nixpkgs channel that we installed on our system [whose only version is a commit hash in a git repo]

    --- end quote ---

    So you need an extra tool [2] for, quote, "painless dependencies for Nix projects."

    Yes, sure. I'm definitely ditching my version managers in favor of this tool, that hasn't solved these issues in 18 years of its existence.

    [1] https://search.nixos.org/packages?channel=21.05&from=0&size=...

    [2] https://github.com/nmattia/niv

  • repology-rules

    Package normalization ruleset for Repology

    Nixpkgs is quite good. It has the package I'm looking for most o the time.

    According to Repology[1], it's got more packaged projects than any other package repository, and more packages that are up to date than any other repository. It's also pretty on top of CVEs, with only 0.38% of packages having potential vulnerabilities.

    Also check out Repology's size/freshness graph[2]

    [1] https://repology.org

  • poetry2nix

    Convert poetry projects to nix automagically [maintainer=@adisbladis]

    There are multiple ways of doing it. The obvious one (updating nixpkgs) you already mentioned.

    Second way is to override[1], in documentation they are showing how to change compilation parameters, but you can also use this to change version of dependencies or source tarball for the package. As you use Nix you will eventually need to do it as sometimes package was not updated, or perhaps you need to use older version, or enable compilation option.

    Third way is to use overlay[2]. In previous way an existing package was modified. Overlay allows to completely replace or add a new one.

    For example there is a tool called poetry2nix[3], which on the fly translates python poetry lock file to Nix so nix can build them. Nixpkgs includes it and generally is frequently updated, but maybe there was a fix yesterday that hadn't made it there yet and it fixes an important bug. You can fetch that repo independently and attach it to nixpkgs (or you can use it directly).

    Nix also has upcoming feature flakes which to my understanding takes this to a new level. So you can easily compose multiple repos like this in your application.

    > Theres clearly more to Nix than just setting up language environments, which I'm guessing is where its usefuleness really kicks in. But purely for lang env set up, I'm not sure I see a point over other tooling...

    I use it this way and the killer feature for myself is that for a project all I need to have installed is Nix and I can have exact environment the dev used.

    It's not mentioned often, but I think a demo of it would be the repo for Nix program[4]. Typically when you want to compile some open source program, after you check out the repo, a hunt starts for the building tools and libraries needed. With nix you just issue build command or enter build shell[5] and things just work with no errors (or at least I did not get them when trying it a while ago. Everything worked on first try).

    [1] https://nixos.org/manual/nixpkgs/stable/#chap-overrides

    [2] https://nixos.org/manual/nixpkgs/stable/#chap-overlays

    [3] https://github.com/nix-community/poetry2nix

    [4] https://github.com/nixos/nix

    [5] https://hydra.nixos.org/build/153568733/download/1/manual/co...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • nix

    Nix, the purely functional package manager

    There are multiple ways of doing it. The obvious one (updating nixpkgs) you already mentioned.

    Second way is to override[1], in documentation they are showing how to change compilation parameters, but you can also use this to change version of dependencies or source tarball for the package. As you use Nix you will eventually need to do it as sometimes package was not updated, or perhaps you need to use older version, or enable compilation option.

    Third way is to use overlay[2]. In previous way an existing package was modified. Overlay allows to completely replace or add a new one.

    For example there is a tool called poetry2nix[3], which on the fly translates python poetry lock file to Nix so nix can build them. Nixpkgs includes it and generally is frequently updated, but maybe there was a fix yesterday that hadn't made it there yet and it fixes an important bug. You can fetch that repo independently and attach it to nixpkgs (or you can use it directly).

    Nix also has upcoming feature flakes which to my understanding takes this to a new level. So you can easily compose multiple repos like this in your application.

    > Theres clearly more to Nix than just setting up language environments, which I'm guessing is where its usefuleness really kicks in. But purely for lang env set up, I'm not sure I see a point over other tooling...

    I use it this way and the killer feature for myself is that for a project all I need to have installed is Nix and I can have exact environment the dev used.

    It's not mentioned often, but I think a demo of it would be the repo for Nix program[4]. Typically when you want to compile some open source program, after you check out the repo, a hunt starts for the building tools and libraries needed. With nix you just issue build command or enter build shell[5] and things just work with no errors (or at least I did not get them when trying it a while ago. Everything worked on first try).

    [1] https://nixos.org/manual/nixpkgs/stable/#chap-overrides

    [2] https://nixos.org/manual/nixpkgs/stable/#chap-overlays

    [3] https://github.com/nix-community/poetry2nix

    [4] https://github.com/nixos/nix

    [5] https://hydra.nixos.org/build/153568733/download/1/manual/co...

  • jsmin

    Javascript minifier

    With the power of direnv only the versions one needs are included.

    [1] https://github.com/tikitu/jsmin/issues/33

    [2] > ls /nix/store/ |head

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts