• unknowing8343@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    There is a part of me that wants to try this, but I have one question.

    I believe this distribution allows you to have multiple versions of the same library to work with different programs at the same time, correct? Does this mean that each program downloads all its dependencies independently? If the answer is yes, I am staying with Arch. Too much bloat.

    • Past Pollution@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Not exactly. If one package needs foo as a dependency, and another package also needs foo, it won’t download a second copy.

      But if another package needs, say, an older version of foo, it can download the older version of foo and you’ll have two foo packages.

      This is possible because Nix packages have hashes to differentiate between them, so any package can ask for the exact version of foo it needs instead of asking for foo in general and hoping the version it gets isn’t incompatible.

      Pretty sure this is also different from other containerized package managers, like Flatpaks or Snaps, which I believe throw all the dependencies in with their packages so each package has exactly what it needs in its container, and which is obviously going to be much more bloated than having shared dependencies. As far as I know Nix on the other hand doesn’t get any more bloated than other distros (keep in mind that regular distros like Arch will still sometimes have multiple versions of a package, for example Python).