Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / ccache.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2016 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages ccache)
21 #:use-module (guix packages)
22 #:use-module ((guix licenses) #:select (gpl3+))
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages compression))
28
29 (define-public ccache
30 (package
31 (name "ccache")
32 (version "3.3.2")
33 (source
34 (origin
35 (method url-fetch)
36 (uri (string-append "https://www.samba.org/ftp/ccache/ccache-"
37 version ".tar.xz"))
38 (sha256
39 (base32
40 "0c25l78hi36682l9cyxca78i8sdkmgmv9afip1s21y6q4g5qaxlh"))))
41 (build-system gnu-build-system)
42 (native-inputs `(("perl" ,perl) ;for test.sh
43 ("which" ,(@ (gnu packages base) which))))
44 (inputs `(("zlib" ,zlib)))
45 (arguments
46 '(#:phases (modify-phases %standard-phases
47 (add-before 'check 'setup-tests
48 (lambda _
49 (substitute* '("test/test_hashutil.c" "test.sh")
50 (("#!/bin/sh") (string-append "#!" (which "sh")))
51 (("which") (which "which")))
52 #t)))))
53 (home-page "https://ccache.samba.org/")
54 (synopsis "Compiler cache")
55 (description
56 "Ccache is a compiler cache. It speeds up recompilation by caching
57 previous compilations and detecting when the same compilation is being done
58 again. Supported languages are C, C++, Objective-C, Objective-C++, and
59 Fortran 77.")
60 (license gpl3+)))