[Nix-dev] Using ccache without changing stdenv hash?

Shea Levy shea at shealevy.com
Tue Dec 9 18:59:01 CET 2014


The option is there for development, I’m not sure how it all works though. Does ccache perfectly control for all the inputs nix does? I thought it would return a cached value if the compiler changed (but stayed the same version).

> On Dec 9, 2014, at 5:57 PM, Wout Mertens <wout.mertens at gmail.com> wrote:
> 
> I don't follow. It's a cache, so it always returns the same output for a given set of inputs (compiler version, source files, preprocessor settings). Its presence should be undetectable.
> 
> The only impurity is that time taken to compile is dependent on previous compiles, no?
> 
> However, it is still useful for development but not if using it means rebuilding the world on your laptop... So I'd like to at least offer the option for development.
> 
> Wout.
> 
> On Tue Dec 09 2014 at 6:32:04 PM Shea Levy <shea at shealevy.com <mailto:shea at shealevy.com>> wrote:
> ccache is impure and thus should not be used for hydra.
> 
> 
>> On Dec 9, 2014, at 5:28 PM, Wout Mertens <wout.mertens at gmail.com <mailto:wout.mertens at gmail.com>> wrote:
>> 
> 
>> Hi all,
>> 
>> there is some support for ccache in the tree but nothing in the way of documentation. I gave it a shot, see https://github.com/NixOS/nixpkgs/issues/2387#issuecomment-66215017 <https://github.com/NixOS/nixpkgs/issues/2387#issuecomment-66215017>, and it seems to work however it also changes the hash of stdenv.
>> 
>> Is there a way to change stdenv so that ccache can be turned on or off without causing rebuilds?
>> 
>> I'm convinced that this would be a major boon for Hydra, which probably spends a lot of time compiling the same C/C++ files with the same preprocessed output. Likewise for developing expressions.
>> 
>> Wout.
> 
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl <mailto:nix-dev at lists.science.uu.nl>
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev <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/20141209/08d2f7d1/attachment-0001.html 


More information about the nix-dev mailing list