[Nix-dev] On npm2nix and the NPM package set in Nixpkgs

Nikolay Amiantov ab at fmap.me
Mon Jul 11 12:36:38 CEST 2016


One possible way is to add some attribute in current nixpkgs indicating
version of checksumming scheme, e.g. `fetchgit.checksumVersion`.
However, this implies that you would run something like
`nix-instantiate` to determine it, and so you need access to the nixpkgs
tree -- IIRC you don't have such requirements now, and adding whole
complexity for just getting this version seems unreasonable.

What about pushing different versions of your utility to release and
master branches? I feel this could cover most usecases...

On 07/11/2016 01:26 PM, Sander van der Burg wrote:
> Thanks for the reference. Actually, the change in Nixpkgs makes sense,
> as I never understood why any file with a .git prefix had to be removed.
> Similarly, I replicated this odd behaviour in npm2nix.
> 
> I have managed to implement a fix for this locally (which I haven't
> pushed yet). The only annoying thing is that the 16.03 stable release
> still uses the old git hash computation method, so I need to keep the
> old method intact.
> 
> I'm still a bit puzzled on how to proceed -- I could decide to release
> my npm2nix version and use the hash computation method that works with
> 16.03 since that's the stable version and what end-users should use.
> Then for the master branch, people should switch to the development
> version of npm2nix that implements the new strategy. The only thing I'm
> afraid of is that people forget about this and push broken versions of
> the Node.js packages to master.
> 
> Alternatively, I could make both strategies configurable through a
> command-line parameter, but this is not very nice either. And still,
> end-users might forget about it and break the package set.

-- 
Nikolay.


More information about the nix-dev mailing list