diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index 61ed3825bd9..ead30a56e27 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -1,30 +1,22 @@ -{ stdenv, fetchurl, perl, zlib, makeWrapper }: +{ stdenv, fetchFromGitHub, asciidoc-full, gperf, perl, autoreconfHook, zlib, makeWrapper }: let ccache = stdenv.mkDerivation rec { pname = "ccache"; - version = "3.4.1"; + version = "3.7.10"; - src = fetchurl { - sha256 = "1pppi4jbkkj641cdynmc35jaj40jjicw7gj75ran5qs5886jcblc"; - url = "mirror://samba/ccache/${pname}-${version}.tar.xz"; + src = fetchFromGitHub { + owner = "ccache"; + repo = "ccache"; + rev = "v${version}"; + sha256 = "0v6pvj50y18fxh2f6cx6xyg545xcpxfmrcg9bzbc6lc5acrvvjm7"; }; - nativeBuildInputs = [ perl ]; + nativeBuildInputs = [ asciidoc-full autoreconfHook gperf perl ]; buildInputs = [ zlib ]; outputs = [ "out" "man" ]; - # non to be fail on filesystems with unconventional blocksizes (zfs on Hydra?) - patches = [ - ./fix-debug-prefix-map-suite.patch - ./skip-fs-dependent-test.patch - ]; - - postPatch = '' - substituteInPlace Makefile.in --replace 'objs) $(extra_libs)' 'objs)' - ''; - doCheck = !stdenv.isDarwin; passthru = { @@ -71,8 +63,8 @@ let ccache = stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Compiler cache for fast recompilation of C/C++ code"; - homepage = "http://ccache.samba.org/"; - downloadPage = "https://ccache.samba.org/download.html"; + homepage = "https://ccache.dev/"; + downloadPage = "https://ccache.dev/download.html"; license = licenses.gpl3Plus; platforms = platforms.unix; }; diff --git a/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch b/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch deleted file mode 100644 index 98a6fbf10bf..00000000000 --- a/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/test/suites/debug_prefix_map.bash -+++ b/test/suites/debug_prefix_map.bash -@@ -29,7 +29,7 @@ - expect_stat 'cache hit (preprocessed)' 0 - expect_stat 'cache miss' 1 - expect_stat 'files in cache' 2 -- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then -+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then - test_failed "Source dir (`pwd`) found in test.o" - fi - -@@ -39,7 +39,7 @@ - expect_stat 'cache hit (preprocessed)' 0 - expect_stat 'cache miss' 1 - expect_stat 'files in cache' 2 -- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then -+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then - test_failed "Source dir (`pwd`) found in test.o" - fi - -@@ -52,10 +52,10 @@ - expect_stat 'cache hit (preprocessed)' 0 - expect_stat 'cache miss' 1 - expect_stat 'files in cache' 2 -- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then -+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then - test_failed "Source dir (`pwd`) found in test.o" - fi -- if ! grep "name" test.o >/dev/null 2>&1; then -+ if ! objdump -g test.o | grep ": name$" >/dev/null 2>&1; then - test_failed "Relocation (name) not found in test.o" - fi - -@@ -65,7 +65,7 @@ - expect_stat 'cache hit (preprocessed)' 0 - expect_stat 'cache miss' 1 - expect_stat 'files in cache' 2 -- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then -+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then - test_failed "Source dir (`pwd`) found in test.o" - fi - } diff --git a/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch b/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch deleted file mode 100644 index 7b233df6531..00000000000 --- a/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/test/suites/cleanup.bash -+++ b/test/suites/cleanup.bash -@@ -94,23 +94,6 @@ - - $CCACHE -F 0 -M 256K >/dev/null - CCACHE_LOGFILE=/tmp/foo $CCACHE -c >/dev/null -- expect_file_count 3 '*.o' $CCACHE_DIR -- expect_file_count 3 '*.d' $CCACHE_DIR -- expect_file_count 3 '*.stderr' $CCACHE_DIR -- expect_stat 'files in cache' 9 -- expect_stat 'cleanups performed' 1 -- for i in 3 4 5; do -- file=$CCACHE_DIR/a/result$i-4017.o -- if [ ! -f $file ]; then -- test_failed "File $file removed when it shouldn't" -- fi -- done -- for i in 0 1 2 6 7 8 9; do -- file=$CCACHE_DIR/a/result$i-4017.o -- if [ -f $file ]; then -- test_failed "File $file not removed when it should" -- fi -- done - - # ------------------------------------------------------------------------- - TEST "Automatic cache cleanup, limit_multiple 0.9"