News for hackers. Stuff that matters.
Re:Ditch your version manager by dmitriid on Monday September 20, 2021 @04:33AM (#28591479)
> It is not the same level of reproducibility like Nix and Bazel provides.

What is "the same level"?

> You can pin ruby to exact version you want with https://nixos.wiki/wiki/Overlays

That page says: "Overlays provide a method to extend and change nixpkgs"

I don't want to change something. I want to simply pin a version. This is neither simple, nor scalable, nor maintainable (also here: https://news.ycombinator.com/item?id=28591202):

  Overriding a version

  self: super:
  {
    sl = super.sl.overrideAttrs (old: {
      src = super.fetchFromGitHub {
        owner = "mtoyoda";
        repo = "sl";
        rev = "923e7d7ebc5c1f009755bdeb789ac25658ccce03";
        # If you don't know the hash, the first time, set:
        # sha256 = "0000000000000000000000000000000000000000000000000000";
        # then nix will fail the build with such an error message:
        # hash mismatch in fixed-output derivation '/nix/store/m1ga09c0z1a6n7rj8ky3s31dpgalsn0n-source':
        # wanted: sha256:0000000000000000000000000000000000000000000000000000
        # got:    sha256:173gxk0ymiw94glyjzjizp8bv8g72gwkjhacigd1an09jshdrjb4
        sha256 = "173gxk0ymiw94glyjzjizp8bv8g72gwkjhacigd1an09jshdrjb4";
      };
    });
  }
Re:Ditch your version manager by rvanlaar on Monday September 20, 2021 @05:57AM (#28591982)
Reading your linked post, it seems you are wrestling with how Nix works.

Nix is hard to learn. The concepts used are almost the same, but different. That's because it's solving slightly different problems than package managers currently do.

As the overriding example shows, the versions are pinned by hash and are stored in a file. What about it is not maintainable or scalable?

Re:Ditch your version manager by dmitriid on Monday September 20, 2021 @07:01AM (#28592384)
> Reading your linked post, it seems you are wrestling with how Nix works.

Not only me.

> That's because it's solving slightly different problems than package managers currently do.

We keep hearing this claim, and hardly any proof of that.

> As the overriding example shows, the versions are pinned by hash and are stored in a file. What about it is not maintainable or scalable?

1. Commit hashes are not versions

2. Hunting down every commit hash of every package to pin down the exact version is neither maintainable nor scalable

Re:Ditch your version manager by jbboehr on Monday September 20, 2021 @10:49AM (#28594387)
> Hunting down every commit hash of every package to pin down the exact version is neither maintainable nor scalable

I believe flakes will make this a lot easier, but it's not quite here yet.

Re:Ditch your version manager by dmitriid on Tuesday September 21, 2021 @03:21AM (#28602773)
> I believe flakes will make this a lot easier

Somewhat, I guess? It will apparently let you write this:

  {
    inputs = {
      home-manager.url = "github:nix-community/home-manager";
    };
  }
where you can manually point to a specific commit/branch for a tool.

Better than nothing, I guess :)

Re:Ditch your version manager by clhodapp on Monday September 20, 2021 @11:18AM (#28594745)
In terms of version pinning, flakes are essentially just an in-tree equivalent of niv, I will say.