[Nix-dev] nix-prefetch-git in nixpkgs

Nicolas Pierron nicolas.b.pierron at gmail.com
Fri Jun 8 05:22:35 CEST 2012


Hi,

On Thu, Jun 7, 2012 at 7:06 AM, Kirill Elagin <kirelagin at gmail.com> wrote:
> I'm reading nix-prefetch-git from HEAD right now and its behaviour seems to
> be consistent with documentation except for a small bug that renders those
> --* setters a bit unusable (see this).

What you call the old syntax is currently the most used.  I would be
quite happy to remove it, but this will change a lot of hashes.
I don't understand, the for loop should still iterate over the
arguments, unless bash is removing them from the list of argument
because they are directly used.

> Next. You are giving a tag as `rev`. `rev` must be one of "HEAD",
> `refs/*`-reference or commit hash (actually adding support for tags would be
> really nice).

refs/tags/v1.0.11

May be a --tag which does this desugaring should be enough.

> The problem is that the script doesn't have a code path that
> handles invalid rev's — it just doesn't do anything (see here) =).

Can somebody accept these patch, if this is not already the case?

>
>
> 2012/6/4 Lluís Batlle i Rossell <viric at viric.name>
>>
>> Hello,
>>
>> I can't understand how nix-prefetch-git works.
>> If I call:
>>  ./nix-prefetch-git git://gitorious.org/qt-labs/jom.git v1.0.11
>> it does not fetch anything and gives always the same hash.
>>
>> If I call:
>>  ./nix-prefetch-git --url git://gitorious.org/qt-labs/jom.git --rev
>> v1.0.11
>> it says: unknown flag '--rev'.
>>
>> And its output without parameters is a help that says:
>>  syntax: nix-prefetch-git [options] [URL [REVISION [EXPECTED-HASH]]]
>>
>>  Options:
>>      --out path      Path where the output would be stored.
>>      --url url       Any url understand by 'git clone'.
>>      --rev ref       Any sha1 or references (such as refs/heads/master)
>>      --hash h        Expected hash.
>>      --deepClone     Clone submodules recursively.
>>      --no-deepClone  Do not clone submodules.
>>      --leave-dotGit  Keep the .git directories.
>>      --builder       Clone as fetchgit does, but url, rev, and out option
>> are mandatory.
>>
>> So, do I fail to understand how to call nix-prefetch-git, or it is very
>> wrong? :)
>>
>> Thank you,
>> Lluís.
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>



-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/


More information about the nix-dev mailing list