ied icon indicating copy to clipboard operation
ied copied to clipboard

Distro package-friendliness

Open cstrahan opened this issue 8 years ago • 7 comments

Hello, Nix package maintainer here.

I saw the "node_modules as CAS" bullet-point on the project's homepage, and it raised a potential red flag for me. In Nixpkgs, it's not uncommon to need to patch packages (to fix bad assumptions around file paths and such), and if packages are referred to via content hash, I would wonder if such patches would still work in your scheme. Is the content hash supposed to be invariant? Because it's quite likely that some of them will change under Nix (either before or after install), and it would be a packaging nightmare if we had to traverse an entire dependency graph and rewrite expected hashes in order for ied to correctly resolve modified dependencies.

To be clear, that's not a problem unique to Nix - that would be problem for all package managers when their respective distro deems patches necessary (Debian/Ubuntu/Fedora/etc).

cstrahan avatar Jan 27 '16 21:01 cstrahan

The readme is out-of-date. CAS is not used anymore. https://github.com/alexanderGugel/ied/issues/48#issuecomment-175318512

davej avatar Jan 28 '16 11:01 davej

Hmm, i think hashes are still being used (v0.4.11)... what was mentioned in there was just a plan for future versions.

In ied's implementation though, hashes are derived not from the contents, but rather unique identifiers of the package (eg, [email protected]). This makes much more sense in the npm context, IMHO. #79

rstacruz avatar Jan 31 '16 20:01 rstacruz

@rstacruz I'm still not sure about what makes more sense. We might as well not use a CAS in the first place then and simply use name-version as folder names.

alexanderGugel avatar Jan 31 '16 22:01 alexanderGugel

or just name/version

Arrggghhh... I'm really not sure... it once was a CAS, but that's no longer the case unless we consider name + version to be the content... which is definitely kind of a lie.

alexanderGugel avatar Jan 31 '16 22:01 alexanderGugel

I might suggest looking at some of the difficulties we've had packaging npm libs/apps in NixOS to drive the design of ied:

http://sandervanderburg.blogspot.com/2016/02/managing-npm-flat-module-installations.html

If ied can provide a sane(r) story for packaging in distros, you'll have the backing of everyone using and contributing to NixOS :).

cstrahan avatar Apr 06 '16 05:04 cstrahan

Big plus from another NixOS maintainer here. We desperately need a package manager for node that fits the sane model.

domenkozar avatar May 30 '16 14:05 domenkozar

i think a killer feature of of ied could be to (optionally) support installing system packages via nix similar way stack does it.

which brings me to another point. you could reuse nix infrastructure and provide binaries :)

garbas avatar May 31 '16 20:05 garbas