gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / ccache.scm
CommitLineData
5bbd6bf1 1;;; GNU Guix --- Functional package management for GNU
4747cca2 2;;; Copyright © 2014, 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
3d39ab45 3;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
a29a8a91 4;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
3f944e62 5;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
5bbd6bf1
EB
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages ccache)
23 #:use-module (guix packages)
24 #:use-module ((guix licenses) #:select (gpl3+))
25 #:use-module (guix download)
3f944e62 26 #:use-module (guix build-system cmake)
5bbd6bf1
EB
27 #:use-module (gnu packages)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages compression))
30
31(define-public ccache
32 (package
33 (name "ccache")
3f944e62 34 (version "4.2")
5bbd6bf1
EB
35 (source
36 (origin
3251c628 37 (method url-fetch)
9eb456b8
VL
38 (uri (string-append "https://github.com/ccache/ccache/releases/download/v"
39 version "/ccache-" version ".tar.xz"))
3251c628 40 (sha256
3f944e62
GH
41 (base32 "0kx9ggbbm899zwyyxvm4dgzn1b95zi1niz0l734pi5y3i0cb251g"))))
42 (build-system cmake-build-system)
71b186ef 43 (native-inputs `(("perl" ,perl) ; for test/run
9d5448f3 44 ("which" ,(@ (gnu packages base) which))))
3f944e62
GH
45 (inputs `(("zlib" ,zlib)
46 ("zstd" ,zstd "lib")))
5bbd6bf1 47 (arguments
3f944e62
GH
48 '(#:phases
49 (modify-phases %standard-phases
50 (add-before 'configure 'setup-tests
51 (lambda _
52 (substitute* '("unittest/test_hashutil.cpp" "test/suites/base.bash")
53 (("#!/bin/sh") (string-append "#!" (which "sh"))))
54 #t))
55 ;; tests require a writable HOME
56 (add-before 'check 'set-home
57 (lambda _
58 (setenv "HOME" (getenv "TMPDIR"))
59 #t)))))
9eb456b8 60 (home-page "https://ccache.dev/")
5bbd6bf1
EB
61 (synopsis "Compiler cache")
62 (description
63 "Ccache is a compiler cache. It speeds up recompilation by caching
64previous compilations and detecting when the same compilation is being done
9eb456b8 65again. Supported languages are C, C++, Objective-C and Objective-C++.")
5bbd6bf1 66 (license gpl3+)))