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> |
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") | |
922fbf8a | 35 | (version "5.2.0") |
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 | |
922fbf8a | 43 | "1d73a5c5qdrwck0fa5pxz0myizaf3s9alsvhiqwrjahdlr29zgkl")))) |
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))) |
4a4fc718 | 62 | (home-page "http://jemalloc.net/") |
82d8729b SB |
63 | (synopsis "General-purpose scalable concurrent malloc implementation") |
64 | (description | |
65 | "This library providing a malloc(3) implementation that emphasizes | |
66 | fragmentation avoidance and scalable concurrency support.") | |
67 | (license bsd-2))) | |
d53fb678 NM |
68 | |
69 | (define-public jemalloc-4.5.0 | |
70 | (package | |
71 | (inherit jemalloc) | |
72 | (version "4.5.0") | |
73 | (source (origin | |
74 | (method url-fetch) | |
75 | (uri (string-append | |
76 | "https://github.com/jemalloc/jemalloc/releases/download/" | |
77 | version "/jemalloc-" version ".tar.bz2")) | |
78 | (sha256 | |
79 | (base32 | |
80 | "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl")))) | |
81 | (inputs '()))) |