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

Bjørn Forsman bjorn.forsman at gmail.com
Wed Sep 24 21:58:51 CEST 2014


On 22 September 2014 17:16, Shea Levy <shea at shealevy.com> wrote:
> I suppose a flag that says to rebuild if the output is valid but doesn't
> have the right deriver could be what you want? But for now the best answer
> seems to be "change the hash when it needs to change"

I don't know what "deriver" is.

Even though it's a bit hackish, using

stdenv.mkDerivation rec {
  extraHash = builtins.hashString "sha256" (buildCommand);
  name = "foo-${extraHash}-0.0";

works just like I want it to.

Best regards,
Bjørn Forsman


More information about the nix-dev mailing list