it requires that you use a nixpkgs snapshot for which there are build outputs present in the cache. you can also build your stuff once and push them to a cache.
nix only cares about the inputs to a derivation for the store hash, so if your TH is generating code with nondeterministic values, it will not be noticed
if you build the package with nix and push it to a cache, it will be served when another build requests that package. the output doesn't factor into that process
Does building via cabal2nix save me compilation of stackage dependencies because they can be taken care of by the nix cache?
possibly!
it requires that you use a nixpkgs snapshot for which there are build outputs present in the cache. you can also build your stuff once and push them to a cache.
Thanks.
But that cannot work if the dependency contains template haskell, can it?
nix only cares about the inputs to a derivation for the store hash, so if your TH is generating code with nondeterministic values, it will not be noticed
if you have a different reason to assume this, please describe!
I am thinking of the situation that because of template haskell in some stackage package the build output is different every time.
And I depend on that stackage package.
if you build the package with nix and push it to a cache, it will be served when another build requests that package. the output doesn't factor into that process
That means, using the cache and building myself might yield different results.
Does it not?
yes, though that would be true for any two individual builds, without using nix
Thanks a lot.