3 ms·
> If that commit is still available. Why wouldn't it be available? Nix packages are on github. [1] > And that's on top the fact that "if you tried to follow t
by rvanlaar 5y ago
> If that commit is still available.
Why wouldn't it be available? Nix packages are on github. [1]
> And that's on top the fact that "if you tried to follow this article step by step, you’ll have noticed that the versions of ruby and node you installed are probably slightly different from the ones above"
That's the same as on any other host. If I write about installing ruby on ubuntu today and you read the blog post a whole later you'll probably get a newer version.
[1]https://github.com/NixOS/nixpkgs https://github.com/NixOS/nixpkgs
- dmitriid 5y ago> Why wouldn't it be available? Nix packages are on github. [1] 1. Git history can be re-written. 2. Nix packages still point to some specific versions that may or not may be available [1] So how exactly is nix so much different from "a problem with our CI/CD pipeline because an old package that's a sub dependency wouldn't install anymore"? > That's the same as on any other host. If I write about installing ruby on ubuntu today and you read the blog post a whole later you'll probably get a newer version. That is only true insofar as you use a "get me the latest version of the package, regardless". In any sane system the solution to that is to do `npm install <specific version>` or `gem install <specific version>` or `pip install <specific version>` or `brew install <specific version>` In nix, apparently it is: - find the commit hash of the nix package channel - pull a package that still points to a rather random version Which raises another question: nixpackages 21.05's ruby_2_6 is actually ruby 2.6.8. It's not available in nixpackages 20.09. But 21.05 doesn't contain the newer Go versions. So, if I wanted ruby 2.6.7 and go 1.13 (neither are available in either 21.05 or 20.09), I would do what exactly? Or if I wanted ruby_2_6 (available in 21.05) and go_1_16 (available in 20.09)? All other package/dependency management tools don't even have such a problem. So far I've asked this at least three different times, and every time the question been ignored or avoided. But sure, nix is amazing, and is a reproducible build system unlike any other. It's been around for at least 18 years. You'd think there would be easy answers to these questions by now. [1] Example, https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/ruby-packages.nix https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/...
- rvanlaar 5y agoHey, Maybe nix is not for you. I'm not well versed with nix packages and only use the basics. Your answer on how to pin this package hasn't been answered good enough for you because it takes work to pin packages and it isn't as trivial as on ubuntu. To paraphrase it's a great place to live but not to visit. Some of my friends are active in the NIX community. They mentioned that it was around as hard as learning haskell. One of them only grokked nix after he read nix pills [1]. I think nix has good concepts and in theory is the package manager I would like to use. In practice it isn't that. Personally, I run ubuntu and use nix packages for three things: - quickly test a program without needing to install it system wide via apt-get `nix-shell -p appname` - together with direnv for the dependencies of CPP projects I work on and - installing commandline tools packages [1] https://nixos.org/guides/nix-pills/ https://nixos.org/guides/nix-pills/
- dmitriid 5y ago> it isn't as trivial as on ubuntu > Personally, I run ubuntu What does Ubuntu have to do with it? Here's a quote from the article: --- start quote --- Ditch your version manager September 17, 2021 • 7 min read You probably use a variety of tools to manage your Ruby, Node, Python, Elixir versions, such as rvm, rbenv, nvm, or asdf. They all work reasonably well, right? Well, not quite. ... My ideal dependency manager would allow me to specify each and every dependency that is required to work on my projects. It should be easily reproducible, declarative and easy to upgrade. --- end quote --- To this end, the author proposes to ditch rvm, rbenv, nvm etc. and go for nix. Here's the entirety of what I need to do to pin my ruby version: rvm install 2.1.1 rvm use 2.1.1 That is it. I've yet to see anything that approaches this in nix. We are talking about reproducible builds, aren't we?
- Arkh4m 5y agoHere is an example of doing what you want https://gist.github.com/Arkham/31297c1d75fc59f723a50063bc0f5739 https://gist.github.com/Arkham/31297c1d75fc59f723a50063bc0f5... I found the nixpkgs versions using this tool: https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=ruby https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable...