git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #122492 from MetaDark/ccache

ccache: 4.2.1 → 4.3

commited95b50a7bc39fb8a95de3487aa21c3f498ba475 authorMaximilian Bosch <maximilian@mbosch.me> dateTue 18 May 2021, 19:24 (6 years ago) parent58959f93bd456e
3 files changed+18−33
pkgs/development/tools/misc/ccache/default.nix+13−10 pkgs/development/tools/misc/ccache/env-instead-of-compgen.patch−18 pkgs/top-level/all-packages.nix+5−5
pkgs/development/tools/misc/ccache/default.nix+13−10
@@ -7,26 +7,25 @@
77, cmake
88, perl
99, zstd
10+, bashInteractive
1011, xcodebuild
1112, makeWrapper
1213}:
1314
1415let ccache = stdenv.mkDerivation rec {
1516 pname = "ccache";
16− version = "4.2.1";
17+ version = "4.3";
1718
1819 src = fetchFromGitHub {
1920 owner = pname;
2021 repo = pname;
2122 rev = "v${version}";
22− hash = "sha256-AmgJpW7AGCSggbHp1fLO5yhXS9LIm7O77nQdDERJYAA=";
23+ hash = "sha256-ZBxDTMUZiZJLIYbvACTFwvlss+IZiMjiL0khfM5hFCM=";
2324 };
2425
25− patches = [
26− # test/run use compgen to get environment variable names, but
27− # compgen isn't available in non-interactive bash.
28− ./env-instead-of-compgen.patch
26+ outputs = [ "out" "man" ];
2927
28+ patches = [
3029 # When building for Darwin, test/run uses dwarfdump, whereas on
3130 # Linux it uses objdump. We don't have dwarfdump packaged for
3231 # Darwin, so this patch updates the test to also use objdump on
@@ -38,18 +37,22 @@ let ccache = stdenv.mkDerivation rec {
3837 ];
3938
4039 nativeBuildInputs = [ asciidoc cmake perl ];
41−
4240 buildInputs = [ zstd ];
4341
44− outputs = [ "out" "man" ];
45−
4642 doCheck = true;
47− checkInputs = lib.optional stdenv.isDarwin xcodebuild;
43+ checkInputs = [
44+ # test/run requires the compgen function which is available in
45+ # bashInteractive, but not bash.
46+ bashInteractive
47+ ] ++ lib.optional stdenv.isDarwin xcodebuild;
48+
4849 checkPhase = ''
50+ runHook preCheck
4951 export HOME=$(mktemp -d)
5052 ctest --output-on-failure ${lib.optionalString stdenv.isDarwin ''
5153 -E '^(test.nocpp2|test.basedir|test.multi_arch)$'
5254 ''}
55+ runHook postCheck
5356 '';
5457
5558 passthru = {
pkgs/development/tools/misc/ccache/env-instead-of-compgen.patchdeleted−18
@@ -1,18 +0,0 @@
1−diff --git a/test/run b/test/run
2−index cbdd98f0..bc930200 100755
3−--- a/test/run
4−+++ b/test/run
5−@@ -346,11 +346,11 @@ expect_perm() {
6− }
7−
8− reset_environment() {
9−- while IFS= read -r name; do
10−+ while IFS='=' read -r name value; do
11− if [[ $name =~ ^CCACHE_[A-Z0-9_]*$ ]]; then
12− unset $name
13− fi
14−- done < <(compgen -e)
15−+ done < <(env)
16−
17− unset GCC_COLORS
18− unset TERM
pkgs/top-level/all-packages.nix+5−5
@@ -12759,12 +12759,12 @@ in
1275912759 inherit (stdenv) cc;
1276012760 };
1276112761
12762− ccacheStdenv = lowPrio (makeOverridable ({ extraConfig, stdenv }:
12763− overrideCC stdenv (buildPackages.ccacheWrapper.override {
12764− inherit extraConfig;
12762+ ccacheStdenv = lowPrio (makeOverridable ({ stdenv, ... } @ extraArgs:
12763+ overrideCC stdenv (buildPackages.ccacheWrapper.override ({
1276512764 inherit (stdenv) cc;
12766− })) {
12767− extraConfig = "";
12765+ } // lib.optionalAttrs (builtins.hasAttr "extraConfig" extraArgs) {
12766+ extraConfig = extraArgs.extraConfig;
12767+ }))) {
1276812768 inherit stdenv;
1276912769 });
1277012770