Merge pull request #220993 from kira-bruneau/ccache
ccache: 4.7.4 → 4.8
This commit is contained in:
@@ -13,15 +13,15 @@
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
let ccache = stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ccache";
|
||||
version = "4.7.4";
|
||||
version = "4.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-mt5udwSdzGaspfpAdUavQ55dBeJdhbZjcQpd9xNOQms=";
|
||||
owner = "ccache";
|
||||
repo = "ccache";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
sha256 = "sha256-X7Pv+yEQaKPdWTiKq67kSAyimyKvLSCYr4EjLlw+J0U=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
@@ -53,25 +53,27 @@ let ccache = stdenv.mkDerivation rec {
|
||||
bashInteractive
|
||||
] ++ lib.optional stdenv.isDarwin xcodebuild;
|
||||
|
||||
checkPhase = let
|
||||
badTests = [
|
||||
"test.trim_dir" # flaky on hydra (possibly filesystem-specific?)
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"test.basedir"
|
||||
"test.multi_arch"
|
||||
"test.nocpp2"
|
||||
];
|
||||
in ''
|
||||
runHook preCheck
|
||||
export HOME=$(mktemp -d)
|
||||
ctest --output-on-failure -E '^(${lib.concatStringsSep "|" badTests})$'
|
||||
runHook postCheck
|
||||
'';
|
||||
checkPhase =
|
||||
let
|
||||
badTests = [
|
||||
"test.trim_dir" # flaky on hydra (possibly filesystem-specific?)
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"test.basedir"
|
||||
"test.multi_arch"
|
||||
"test.nocpp2"
|
||||
];
|
||||
in
|
||||
''
|
||||
runHook preCheck
|
||||
export HOME=$(mktemp -d)
|
||||
ctest --output-on-failure -E '^(${lib.concatStringsSep "|" badTests})$'
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
# A derivation that provides gcc and g++ commands, but that
|
||||
# will end up calling ccache for the given cacheDir
|
||||
links = {unwrappedCC, extraConfig}: stdenv.mkDerivation {
|
||||
links = { unwrappedCC, extraConfig }: stdenv.mkDerivation {
|
||||
name = "ccache-links";
|
||||
passthru = {
|
||||
isClang = unwrappedCC.isClang or false;
|
||||
@@ -85,7 +87,7 @@ let ccache = stdenv.mkDerivation rec {
|
||||
wrap() {
|
||||
local cname="$1"
|
||||
if [ -x "${unwrappedCC}/bin/$cname" ]; then
|
||||
makeWrapper ${ccache}/bin/ccache $out/bin/$cname \
|
||||
makeWrapper ${finalAttrs.finalPackage}/bin/ccache $out/bin/$cname \
|
||||
--run ${lib.escapeShellArg extraConfig} \
|
||||
--add-flags ${unwrappedCC}/bin/$cname
|
||||
fi
|
||||
@@ -108,17 +110,19 @@ let ccache = stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Compiler cache for fast recompilation of C/C++ code";
|
||||
homepage = "https://ccache.dev";
|
||||
downloadPage = "https://ccache.dev/download.html";
|
||||
changelog = "https://ccache.dev/releasenotes.html#_ccache_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version
|
||||
}";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ kira-bruneau r-burns ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
in ccache
|
||||
})
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
diff --git a/test/run b/test/run
|
||||
index 43a57312..398be8d8 100755
|
||||
--- a/test/run
|
||||
+++ b/test/run
|
||||
@@ -148,21 +148,17 @@ file_size() {
|
||||
@@ -19,9 +21,9 @@
|
||||
|
||||
objdump_grep_cmd() {
|
||||
- if $HOST_OS_APPLE; then
|
||||
- fgrep -q "\"$1\""
|
||||
- grep -Fq "\"$1\""
|
||||
- elif $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then
|
||||
+ if $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then
|
||||
fgrep -q "$1"
|
||||
grep -Fq "$1"
|
||||
else
|
||||
fgrep -q ": $1"
|
||||
grep -Fq ": $1"
|
||||
|
||||
Reference in New Issue
Block a user