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

Bjørn Forsman bjorn.forsman at gmail.com
Sat Sep 20 21:55:25 CEST 2014


On 20 September 2014 21:45, Bjørn Forsman <bjorn.forsman at gmail.com> wrote:
[...]
> On 20 September 2014 21:26, Vladimír Čunát <vcunat at gmail.com> wrote:
> [...]
>> When I change the basename (and leave the hash the same), fetchurl *will*
>> re-download, because the output name of the file does change. (It will fail,
>> so I see little point anyway.)
>
> Actually, it doesn't fail. (At least in my test.)

Since fetchurl (via the nixos tarball mirror) downloads the same old
file (even though it creates a new store path), the result outputHash
is the same as before. So evaluation doesn't stop but continues on
with old/wrong data.

My idea was that if the basename of url was a part of the outputHash,
fetchurl would actually fail in this scenario. This would prevent
version bumps that have no effect, because of forgetting to update the
hash.

And like I said in the first post, for packaging a grails app, also
taking the input into account when checking the "output" is a must.


More information about the nix-dev mailing list