mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
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++
|
||||
# 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
|
||||
# If instantiated directly, it will use the HOME/.ccache as cache directory.
|
||||
ccacheWrapper = { extraConfig ? "" }: wrapGCC (ccache.links extraConfig);
|
||||
ccacheStdenv = extraConfig: overrideGCC stdenv
|
||||
(ccacheWrapper { inherit extraConfig; } );
|
||||
# You can use an override in packageOverrides to set extraConfig:
|
||||
# packageOverrides = pkgs: {
|
||||
# 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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user