[Nix-dev] Incremental recompilation
stewart mackenzie
setori88 at gmail.com
Sun May 1 10:03:20 CEST 2016
Isn't the simplest solution this:
declare an output
`outputs = ["out" "cache"];`
now the word cache is hardcoded to create a directory
/tmp/${derivation-name}-cache/ this name doesn't change.
Now, in your derivation you can set the build tool (via env var if it
supports that) to use this cache folder as a place to store the build
artifacts.
You may then copy the final build product from `$cache` to `$out` at
some in the `installPhase`.
The last thing about `cache` is that it is _not_ deleted after the
derivation builds.
kr
/sjm
More information about the nix-dev
mailing list