[Nix-dev] fixed-output derivation that *also* depend on (some of) its inputs?

Shea Levy shea at shealevy.com
Sat Sep 20 21:21:43 CEST 2014


fetchurl does depend on the base name, it's the nixos tarball mirror that doesn't

<div>-------- Original message --------</div><div>From: Bjørn Forsman <bjorn.forsman at gmail.com> </div><div>Date:09/20/2014  12:11 PM  (GMT-08:00) </div><div>To: Vladimír Čunát <vcunat at gmail.com> </div><div>Cc: nix-dev <nix-dev at lists.science.uu.nl> </div><div>Subject: Re: [Nix-dev] fixed-output derivation that *also* depend on (some
  of) its inputs? </div><div>
</div>On 20 September 2014 20:50, Vladimír Čunát <vcunat at gmail.com> wrote:
> Hi.
>
> On 09/20/2014 08:34 PM, Bjørn Forsman wrote:
>>
>> IMHO, something like this could also be useful for fetchurl: Let's say
>> we made it also depend on the*basename*  of url, then it'd re-download
>> on package bumps but*not*  on mirror updates. (The fact that fetchurl
>> ignores package bumps is slightly confusing.)
>
>
> I don't have a clue what you want. If you need to download a different file,
> then the hash *will* change, and you have to rewrite it in the expression
> anyway.

No, fetchurl wont re-download if you change url. You have to update
the hash to force a re-download. That's by design, because changing
the mirror shouldn't cause a mass rebuild. But my realization was that
we could have made it depend on the *basename* of url and still
prevent a changing mirror to be mass-rebuild.

For fetchurl this behaviour (ignoring inputs) is just a minor
annoyance, but for packaging a grails app it completely breaks down.

Best regards,
Bjørn Forsman
_______________________________________________
nix-dev mailing list
nix-dev at lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140920/50963b06/attachment.html 


More information about the nix-dev mailing list