Commit | Line | Data |
---|---|---|
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> |
82d8729b SB |
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 jemalloc) | |
06be3161 EF |
21 | #:use-module (srfi srfi-1) |
22 | #:use-module (srfi srfi-26) | |
82d8729b SB |
23 | #:use-module ((guix licenses) #:select (bsd-2)) |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix download) | |
475b99fa | 26 | #:use-module (gnu packages perl) |
82d8729b SB |
27 | #:use-module (guix build-system gnu)) |
28 | ||
29 | (define-public jemalloc | |
30 | (package | |
31 | (name "jemalloc") | |
475b99fa | 32 | (version "5.0.1") |
82d8729b SB |
33 | (source (origin |
34 | (method url-fetch) | |
35 | (uri (string-append | |
4a4fc718 MB |
36 | "https://github.com/jemalloc/jemalloc/releases/download/" |
37 | version "/jemalloc-" version ".tar.bz2")) | |
82d8729b SB |
38 | (sha256 |
39 | (base32 | |
475b99fa | 40 | "1sf3lzgb0y8nnyzmp4zrca3sngdxw3kfh20sna9z03jv74fph528")))) |
82d8729b | 41 | (build-system gnu-build-system) |
06be3161 EF |
42 | (arguments |
43 | `(#:phases | |
44 | (modify-phases %standard-phases | |
45 | (add-after 'unpack 'delete-thp-test | |
46 | ;; This test does not check if transparent huge pages are supported | |
47 | ;; on the system before running the test. | |
48 | (lambda _ | |
49 | (substitute* "Makefile.in" | |
50 | (("\\$\\(srcroot\\)test/unit/pages.c \\\\") "\\")) | |
51 | #t))) | |
52 | ,@(if (any (cute string-prefix? <> (or (%current-target-system) | |
53 | (%current-system))) | |
54 | '("x64_64" "i686")) | |
55 | ;; Transparent huge pages are only enabled by default on Intel processors | |
56 | '() | |
57 | '(#:configure-flags (list "--disable-thp"))))) | |
475b99fa | 58 | (inputs `(("perl" ,perl))) |
4a4fc718 | 59 | (home-page "http://jemalloc.net/") |
82d8729b SB |
60 | (synopsis "General-purpose scalable concurrent malloc implementation") |
61 | (description | |
62 | "This library providing a malloc(3) implementation that emphasizes | |
63 | fragmentation avoidance and scalable concurrency support.") | |
64 | (license bsd-2))) |