git.iko.soy/typeable/nixpkgs
on master help sign in
ccache: drop unnecessary perl dependency

Backport a one-line patch to remove the test suite's dependency on perl, which, while not exactly heavy, is unnecessary.

commit4023da623702c40bb8f998fbc32f6e9596688052 authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> dateWed 1 Jul 2015, 17:43 (11 years ago) parentbc9079d
2 files changed+43−6
pkgs/development/tools/misc/ccache/default.nix+7−6 pkgs/development/tools/misc/ccache/test-drop-perl-requirement.patch+36
pkgs/development/tools/misc/ccache/default.nix+7−6
@@ -1,23 +1,24 @@
1−{ stdenv, fetchurl, runCommand, gcc, perl, zlib }:
1+{ stdenv, fetchurl, runCommand, gcc, zlib }:
22
33let
44 # TODO: find out if there's harm in just using 'rec' instead.
55 name = "ccache-${version}";
66 version = "3.2.2";
77 sha256 = "1jm0qb3h5sypllaiyj81zp6m009vm50hzjnx994ril94kxlrj3ag";
8− doCheck = true;
98
109 ccache =
1110stdenv.mkDerivation {
12− inherit name doCheck;
11+ inherit name;
1312 src = fetchurl {
1413 inherit sha256;
1514 url = "mirror://samba/ccache/${name}.tar.xz";
1615 };
1716
18− # The test dependency on perl should be gone in the next release:
19− buildInputs = [ zlib ]
20− ++ stdenv.lib.optionals doCheck [ perl ];
17+ patches = [ ./test-drop-perl-requirement.patch ];
18+
19+ buildInputs = [ zlib ];
20+
21+ doCheck = true;
2122
2223 passthru = {
2324 # A derivation that provides gcc and g++ commands, but that
pkgs/development/tools/misc/ccache/test-drop-perl-requirement.patchnew file+36
@@ -0,0 +1,36 @@
1+Since perl is used in just one place and can easily be replaced by a
2+little bit of shell, do so. This makes testing on limited systems
3+easier.
4+
5+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
6+---
7+ INSTALL.txt | 1 -
8+ test.sh | 2 +-
9+ 2 files changed, 1 insertion(+), 2 deletions(-)
10+
11+diff --git a/INSTALL.txt b/INSTALL.txt
12+index 256beab..f77cbe6 100644
13+--- a/INSTALL.txt
14++++ b/INSTALL.txt
15+@@ -67,7 +67,6 @@ In addition to the prerequisites mentioned above, you also need:
16+
17+ To debug and run the performance test suite you'll also need:
18+
19+-- Perl (http://www.perl.org/)
20+ - Python (http://www.python.org/)
21+
22+ Run "./autogen.sh" and then follow the steps mentioned under "Installation"
23+diff --git a/test.sh b/test.sh
24+index f14e287..1090649 100755
25+--- a/test.sh
26++++ b/test.sh
27+@@ -1834,7 +1834,7 @@ prepare_cleanup_test() {
28+ mkdir -p $dir
29+ i=0
30+ while [ $i -lt 10 ]; do
31+- perl -e 'print "A" x 4017' >$dir/result$i-4017.o
32++ printf '%4017s' '' | tr ' ' 'A' >$dir/result$i-4017.o
33+ touch $dir/result$i-4017.stderr
34+ touch $dir/result$i-4017.d
35+ if [ $i -gt 5 ]; then
36+--