[Nix-dev] fetchgit - why sha256 protection?

Mathijs Kwik mathijs at bluescreen303.nl
Mon Nov 19 14:39:27 CET 2012


Marc Weber <marco-oweber at gmx.de> writes:

> Excerpts from Shea Levy's message of Mon Nov 19 13:38:37 +0100 2012:
>> Is it terribly difficult to run nix-prefetch-git?
> YES: I'm talking about such configurations:
> http://gembundler.com/
>
> And here you have git repo and hash. Trying to semi automatically
> package such things requires much overhead if you have to prefetch
> everything to get a sha256 hash.
>
> I'm not talking about the one project you do package once in a year.
> I'm talking about 20 small ruby gem packages you need to get some
> bleeding edge code working.

Have you looked at Shea's npm2nix utility for node.js packages?
It's really not that big/scary. Just give it the name of an npm package
and it outputs a nix expression (including sha256) for that package,
including its dependencies.

A similar solution for rubygems would probably not be too hard.
As rubygems itself is written in ruby, you can probably plug in to its
dependency resolution and downloading capabilities so you can focus on
generating the sha256 and the nix expression.


>
> Marc Weber
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list