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