mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
ccacheStdenv: provide working example config in docs
This commit is contained in:
parent
1bcbc4994d
commit
857cb10e1d
1 changed files with 11 additions and 5 deletions
|
@ -5744,16 +5744,22 @@ in
|
|||
# It can be used by setting in nixpkgs config like this, for example:
|
||||
# replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
|
||||
# But if you build in chroot, you should have that path in chroot
|
||||
# If instantiated directly, it will use the HOME/.ccache as cache directory.
|
||||
# You can use an override in packageOverrides to set extraConfig:
|
||||
# If instantiated directly, it will use $HOME/.ccache as the cache directory,
|
||||
# i.e. /homeless-shelter/.ccache using the Nix daemon.
|
||||
# You should specify a different directory using an override in
|
||||
# packageOverrides to set extraConfig.
|
||||
#
|
||||
# Example using Nix daemon (i.e. multiuser Nix install or on NixOS):
|
||||
# packageOverrides = pkgs: {
|
||||
# ccacheWrapper = pkgs.ccacheWrapper.override {
|
||||
# extraConfig = ''
|
||||
# CCACHE_COMPRESS=1
|
||||
# CCACHE_DIR=/bin/.ccache
|
||||
# export CCACHE_COMPRESS=1
|
||||
# export CCACHE_DIR=/var/cache/ccache
|
||||
# export CCACHE_UMASK=007
|
||||
# '';
|
||||
# };
|
||||
#
|
||||
# You can use a different directory, but whichever directory you choose
|
||||
# should be owned by user root, group nixbld with permissions 0770.
|
||||
ccacheWrapper = makeOverridable ({ extraConfig ? "" }:
|
||||
wrapCC (ccache.links extraConfig)) {};
|
||||
ccacheStdenv = lowPrio (overrideCC stdenv ccacheWrapper);
|
||||
|
|
Loading…
Reference in a new issue