gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / jemalloc.scm
CommitLineData
82d8729b
SB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
06be3161 3;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
aa5c2063 4;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
82d8729b
SB
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages jemalloc)
06be3161
EF
22 #:use-module (srfi srfi-1)
23 #:use-module (srfi srfi-26)
82d8729b
SB
24 #:use-module ((guix licenses) #:select (bsd-2))
25 #:use-module (guix packages)
26 #:use-module (guix download)
d53fb678 27 #:use-module (guix utils)
aa5c2063 28 #:use-module (gnu packages)
475b99fa 29 #:use-module (gnu packages perl)
82d8729b
SB
30 #:use-module (guix build-system gnu))
31
32(define-public jemalloc
33 (package
34 (name "jemalloc")
8aeac338 35 (version "5.2.1")
82d8729b
SB
36 (source (origin
37 (method url-fetch)
38 (uri (string-append
4a4fc718
MB
39 "https://github.com/jemalloc/jemalloc/releases/download/"
40 version "/jemalloc-" version ".tar.bz2"))
82d8729b
SB
41 (sha256
42 (base32
8aeac338 43 "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl"))))
82d8729b 44 (build-system gnu-build-system)
06be3161
EF
45 (arguments
46 `(#:phases
47 (modify-phases %standard-phases
48 (add-after 'unpack 'delete-thp-test
49 ;; This test does not check if transparent huge pages are supported
50 ;; on the system before running the test.
51 (lambda _
52 (substitute* "Makefile.in"
53 (("\\$\\(srcroot\\)test/unit/pages.c \\\\") "\\"))
54 #t)))
55 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
56 (%current-system)))
57 '("x64_64" "i686"))
58 ;; Transparent huge pages are only enabled by default on Intel processors
59 '()
60 '(#:configure-flags (list "--disable-thp")))))
475b99fa 61 (inputs `(("perl" ,perl)))
f430c621
MB
62 ;; Install the scripts to a separate output to avoid referencing Perl and
63 ;; Bash in the default output, saving ~75 MiB on the closure.
64 (outputs '("out" "bin"))
4a4fc718 65 (home-page "http://jemalloc.net/")
82d8729b
SB
66 (synopsis "General-purpose scalable concurrent malloc implementation")
67 (description
68 "This library providing a malloc(3) implementation that emphasizes
69fragmentation avoidance and scalable concurrency support.")
70 (license bsd-2)))
d53fb678
NM
71
72(define-public jemalloc-4.5.0
73 (package
74 (inherit jemalloc)
75 (version "4.5.0")
76 (source (origin
77 (method url-fetch)
78 (uri (string-append
79 "https://github.com/jemalloc/jemalloc/releases/download/"
80 version "/jemalloc-" version ".tar.bz2"))
81 (sha256
82 (base32
83 "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl"))))
84 (inputs '())))