[Nix-dev] On npm2nix and the NPM package set in Nixpkgs
Sander van der Burg
svanderburg at gmail.com
Mon Jul 11 12:34:12 CEST 2016
My personal preference is that the last npm2nix release supports the latest
stable Nixpkgs only. I have noticed that more things (including Hydra) seem
to break after this change in fetchgit.
On Mon, Jul 11, 2016 at 10:26 AM, Sander van der Burg <svanderburg at gmail.com
> 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.
>
>
>
>
> On Fri, Jul 8, 2016 at 9:40 AM, Nikolay Amiantov <ab at fmap.me> wrote:
>
>> This patch is needed to fix sha256 hashes for the old npm2nix -- maybe
>> it would help:
>> https://github.com/NixOS/npm2nix/pull/42
>>
>> BTW, I have updated node-packages-generated.nix with this patch
>> successfully some time ago:
>> https://github.com/NixOS/nixpkgs/pull/16137
>>
>> On 07/08/2016 12:11 AM, Sander van der Burg wrote:
>> > Well, for me personally it does not matter that much.
>> >
>> > So far, I have only seen one +1 vote for making my version the new
>> > npm2nix. However, not so long ago, I noticed that there was another
>> > incoming pull request for the vanilla npm2nix. Perhaps the person who
>> > filed it, did not know about the existence of the reengineering2 branch
>> > or this discussion thread. :)
>> >
>> > Anyway, the reason why I still haven't integrated anything yet, is this
>> > issue: https://github.com/svanderburg/npm2nix/issues/7
>> >
>> > When using the master Nixpkgs branch, it seems that npm2nix no longer
>> > computes the sha256 hashes for the git checkouts correctly. Apparently,
>> > some change in the fetchgit {} infrastructure (or a dependency thereof)
>> > causes this, but I don't know why. When using the latest stable branch
>> > of Nixpkgs (release-16.03) everything seems to work just fine.
>> >
>> > I guess this issue needs to be resolved first. IMO it's a bit useless to
>> > have NPM packages set in Nixpkgs with broken Git dependencies, even
>> > though the master Nixpkgs should not be considered stable.
>> >
>> > Besides npm2nix, other generators are affected as well -- bower2nix also
>> > seems to break in one of my use cases. I haven't checked any other
>> > lang2nix generators though :(
>>
>> --
>> Nikolay.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160711/10a19fa6/attachment.html>
More information about the nix-dev
mailing list