[Nix-dev] Re: restricted downloads

Yury G. Kudryashov urkud+nix at ya.ru
Mon May 3 11:14:12 CEST 2010


Eelco Dolstra wrote:

> Hi,
> 
> On 04/30/2010 10:47 PM, Yury G. Kudryashov wrote:
> 
>> I've just commited support for "restricted downloads" in fetchurl. The
>> idea is that you can write
>> src = fetchurl {
>>   url = "http://restricted.noltd/download.html";
>>   name = "my_restricted_src.zip";
>>   restricted = true;
>>   sha256 = "myhash";
>> };
> 
> This is an abuse of fetchurl.  You should have a different fixed-output
> derivation function that always fails (say, `requireFile { name = ...;
> sha256 =
> ...; errorMessage = ...; }')  - there is no need to use fetchurl for this
> purpose.
Thanks, moved to requireFile in trivial-builders.nix (r21575).





More information about the nix-dev mailing list