[Nix-dev] Re: [Nix-commits] SVN commit: nix - 14015 - raskin - in nixpkgs/trunk/pkgs: tools/graphics tools/graphics/cuneiform top-level

Eelco Dolstra e.dolstra at tudelft.nl
Tue Feb 10 16:38:16 CET 2009


Hi,

Ludovic Courtès wrote:

> Michael Raskin <7c6f434c at mail.ru> writes:
> 
>> Eelco Dolstra wrote:
> 
>>>> +in
>>>> +rec {
>>>> +  src = fetchurl {
>>>> +    url = "http://launchpad.net/cuneiform-linux/${version}/${version}/+download/cuneiform-${version}.tar.bz2";
>>>> +    sha256 = "0jgiccimwv1aqp9gzl9937gdlh9zl5qpaygf0n1xcbfd5aqz14ig";
>>>> +  };
>>> This fetchurl call is potentially inconsistent: if I supply a version other than
>>> 0.6, the sha256 hash won't be correct.
>> That is not the point. The point is that you do not need to edit version
>> everywhere in expression - and if you specify it wrong, fetchurl fails.
> 
> Agreed, it makes for smaller diffs.  :-)

To be clear, I don't have a problem with 'let version = "0.6";' which is very
convenient (and also cleaner since you shouldn't repeat the same piece of
information).  The problem is that it gets the version from the function
arguments, so the function basically promises something in its interface that it
doesn't support (namely that you can ask it to build arbitrary versions).

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list