gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / ccache.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
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)
26 #:use-module (guix build-system cmake)
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")
34 (version "4.2")
35 (source
36 (origin
37 (method url-fetch)
38 (uri (string-append "https://github.com/ccache/ccache/releases/download/v"
39 version "/ccache-" version ".tar.xz"))
40 (sha256
41 (base32 "0kx9ggbbm899zwyyxvm4dgzn1b95zi1niz0l734pi5y3i0cb251g"))))
42 (build-system cmake-build-system)
43 (native-inputs `(("perl" ,perl) ; for test/run
44 ("which" ,(@ (gnu packages base) which))))
45 (inputs `(("zlib" ,zlib)
46 ("zstd" ,zstd "lib")))
47 (arguments
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)))))
60 (home-page "https://ccache.dev/")
61 (synopsis "Compiler cache")
62 (description
63 "Ccache is a compiler cache. It speeds up recompilation by caching
64 previous compilations and detecting when the same compilation is being done
65 again. Supported languages are C, C++, Objective-C and Objective-C++.")
66 (license gpl3+)))