Merge pull request #122492 from MetaDark/ccache

ccache: 4.2.1 → 4.3

authored by

Maximilian Bosch and committed by
GitHub
ed95b50a 58959f9d

+18 -33
+13 -10
pkgs/development/tools/misc/ccache/default.nix
··· 7 7 , cmake 8 8 , perl 9 9 , zstd 10 + , bashInteractive 10 11 , xcodebuild 11 12 , makeWrapper 12 13 }: 13 14 14 15 let ccache = stdenv.mkDerivation rec { 15 16 pname = "ccache"; 16 - version = "4.2.1"; 17 + version = "4.3"; 17 18 18 19 src = fetchFromGitHub { 19 20 owner = pname; 20 21 repo = pname; 21 22 rev = "v${version}"; 22 - hash = "sha256-AmgJpW7AGCSggbHp1fLO5yhXS9LIm7O77nQdDERJYAA="; 23 + hash = "sha256-ZBxDTMUZiZJLIYbvACTFwvlss+IZiMjiL0khfM5hFCM="; 23 24 }; 24 25 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" ]; 29 27 28 + patches = [ 30 29 # When building for Darwin, test/run uses dwarfdump, whereas on 31 30 # Linux it uses objdump. We don't have dwarfdump packaged for 32 31 # Darwin, so this patch updates the test to also use objdump on ··· 38 37 ]; 39 38 40 39 nativeBuildInputs = [ asciidoc cmake perl ]; 41 - 42 40 buildInputs = [ zstd ]; 43 41 44 - outputs = [ "out" "man" ]; 42 + doCheck = true; 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; 45 48 46 - doCheck = true; 47 - checkInputs = lib.optional stdenv.isDarwin xcodebuild; 48 49 checkPhase = '' 50 + runHook preCheck 49 51 export HOME=$(mktemp -d) 50 52 ctest --output-on-failure ${lib.optionalString stdenv.isDarwin '' 51 53 -E '^(test.nocpp2|test.basedir|test.multi_arch)$' 52 54 ''} 55 + runHook postCheck 53 56 ''; 54 57 55 58 passthru = {
-18
pkgs/development/tools/misc/ccache/env-instead-of-compgen.patch
··· 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
+5 -5
pkgs/top-level/all-packages.nix
··· 12759 12759 inherit (stdenv) cc; 12760 12760 }; 12761 12761 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 ({ 12765 12764 inherit (stdenv) cc; 12766 - })) { 12767 - extraConfig = ""; 12765 + } // lib.optionalAttrs (builtins.hasAttr "extraConfig" extraArgs) { 12766 + extraConfig = extraArgs.extraConfig; 12767 + }))) { 12768 12768 inherit stdenv; 12769 12769 }); 12770 12770