2014-05-20 13:20:12 -04:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2018-02-12 23:27:46 -05:00
|
|
|
|
;;; Copyright © 2014, 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
|
2017-03-24 07:53:21 -04:00
|
|
|
|
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
|
2021-05-12 14:33:17 -04:00
|
|
|
|
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
2022-04-12 15:36:39 -04:00
|
|
|
|
;;; Copyright © 2021, 2022 Greg Hogan <code@greghogan.com>
|
2022-11-03 21:39:00 -04:00
|
|
|
|
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
2014-05-20 13:20:12 -04:00
|
|
|
|
;;;
|
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
|
;;;
|
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
|
;;; your option) any later version.
|
|
|
|
|
;;;
|
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
|
;;;
|
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
(define-module (gnu packages ccache)
|
2021-12-18 19:27:23 -05:00
|
|
|
|
#:use-module (guix gexp)
|
2014-05-20 13:20:12 -04:00
|
|
|
|
#:use-module (guix packages)
|
|
|
|
|
#:use-module ((guix licenses) #:select (gpl3+))
|
|
|
|
|
#:use-module (guix download)
|
2021-03-22 15:52:23 -04:00
|
|
|
|
#:use-module (guix build-system cmake)
|
2014-05-20 13:20:12 -04:00
|
|
|
|
#:use-module (gnu packages)
|
2022-11-03 21:39:00 -04:00
|
|
|
|
#:use-module (gnu packages base)
|
|
|
|
|
#:use-module (gnu packages compression)
|
2014-05-20 13:20:12 -04:00
|
|
|
|
#:use-module (gnu packages perl)
|
2022-11-03 21:39:00 -04:00
|
|
|
|
#:use-module (gnu packages ruby))
|
2014-05-20 13:20:12 -04:00
|
|
|
|
|
|
|
|
|
(define-public ccache
|
|
|
|
|
(package
|
|
|
|
|
(name "ccache")
|
2022-12-10 19:00:00 -05:00
|
|
|
|
(version "4.7.4")
|
2014-05-20 13:20:12 -04:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
2019-08-21 18:25:00 -04:00
|
|
|
|
(method url-fetch)
|
2020-03-04 12:29:00 -05:00
|
|
|
|
(uri (string-append "https://github.com/ccache/ccache/releases/download/v"
|
|
|
|
|
version "/ccache-" version ".tar.xz"))
|
2019-08-21 18:25:00 -04:00
|
|
|
|
(sha256
|
2022-12-10 19:00:00 -05:00
|
|
|
|
(base32 "0djfm138m863g772bnq7m2mfwh3y8sqxczc3yssg1yiybp8n836z"))))
|
2021-03-22 15:52:23 -04:00
|
|
|
|
(build-system cmake-build-system)
|
2014-05-20 13:20:12 -04:00
|
|
|
|
(arguments
|
2021-12-18 19:27:23 -05:00
|
|
|
|
(list #:configure-flags
|
|
|
|
|
;; The backend must be explicitly disabled to build without Redis.
|
|
|
|
|
#~(list "-DREDIS_STORAGE_BACKEND=OFF")
|
|
|
|
|
#:phases
|
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
|
(add-before 'configure 'fix-shell
|
|
|
|
|
;; Run early whilst we're still in the source directory.
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* (list "test/run"
|
|
|
|
|
"test/suites/base.bash"
|
|
|
|
|
"unittest/test_hashutil.cpp")
|
|
|
|
|
(("compgen -e") "env | cut -d= -f1")
|
|
|
|
|
(("#!/bin/sh") (string-append "#!" (which "sh"))))))
|
|
|
|
|
(add-before 'check 'set-home
|
|
|
|
|
;; Tests require a writable HOME.
|
|
|
|
|
(lambda _
|
|
|
|
|
(setenv "HOME" (getenv "TMPDIR")))))))
|
2022-11-03 21:39:00 -04:00
|
|
|
|
(native-inputs (list perl ruby-asciidoctor which))
|
|
|
|
|
(inputs (list zlib `(,zstd "lib")))
|
2020-03-04 12:29:00 -05:00
|
|
|
|
(home-page "https://ccache.dev/")
|
2014-05-20 13:20:12 -04:00
|
|
|
|
(synopsis "Compiler cache")
|
|
|
|
|
(description
|
|
|
|
|
"Ccache is a compiler cache. It speeds up recompilation by caching
|
|
|
|
|
previous compilations and detecting when the same compilation is being done
|
2020-03-04 12:29:00 -05:00
|
|
|
|
again. Supported languages are C, C++, Objective-C and Objective-C++.")
|
2014-05-20 13:20:12 -04:00
|
|
|
|
(license gpl3+)))
|