I made the use of ccacheWrapper somewhat easier.
svn path=/nixpkgs/trunk/; revision=31756
This commit is contained in:
parent
9ed137c45b
commit
a4c35d0393
@ -2895,12 +2895,21 @@ let
|
|||||||
|
|
||||||
# Wrapper that works as gcc or g++
|
# Wrapper that works as gcc or g++
|
||||||
# It can be used by setting in nixpkgs config like this, for example:
|
# It can be used by setting in nixpkgs config like this, for example:
|
||||||
# replaceStdenv = { pkgs }: pkgs.ccacheStdenv "exports CCACHE_DIR=/var/ccache";
|
# replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
|
||||||
# But if you build in chroot, you should have that path in chroot
|
# 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.
|
# If instantiated directly, it will use the HOME/.ccache as cache directory.
|
||||||
ccacheWrapper = { extraConfig ? "" }: wrapGCC (ccache.links extraConfig);
|
# You can use an override in packageOverrides to set extraConfig:
|
||||||
ccacheStdenv = extraConfig: overrideGCC stdenv
|
# packageOverrides = pkgs: {
|
||||||
(ccacheWrapper { inherit extraConfig; } );
|
# ccacheWrapper = pkgs.ccacheWrapper.override {
|
||||||
|
# extraConfig = ''
|
||||||
|
# CCACHE_COMPRESS=1
|
||||||
|
# CCACHE_DIR=/bin/.ccache
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
ccacheWrapper = makeOverridable ({ extraConfig ? "" }:
|
||||||
|
wrapGCC (ccache.links extraConfig)) {};
|
||||||
|
ccacheStdenv = overrideGCC stdenv ccacheWrapper;
|
||||||
|
|
||||||
complexity = callPackage ../development/tools/misc/complexity { };
|
complexity = callPackage ../development/tools/misc/complexity { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user