Skip to content

Commit 84eb24b

Browse files
committed
gnu: Add rust-jemallocator-0.1.
* gnu/packages/crates-io.scm (rust-jemallocator-0.1): New variable.
1 parent b08b298 commit 84eb24b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

gnu/packages/crates-io.scm

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6177,6 +6177,36 @@ wasm-bindgen crate.")
61776177
"This package provides a Rust allocator backed by jemalloc.")
61786178
(license (list license:expat license:asl2.0))))
61796179

6180+
(define-public rust-jemallocator-0.1
6181+
(package
6182+
(inherit rust-jemallocator-0.3)
6183+
(name "rust-jemallocator")
6184+
(version "0.1.9")
6185+
(source
6186+
(origin
6187+
(method url-fetch)
6188+
(uri (crate-uri "jemallocator" version))
6189+
(file-name
6190+
(string-append name "-" version ".tar.gz"))
6191+
(sha256
6192+
(base32
6193+
"1csabk36p06nlh3qxxsg6nkf074b2jq2cld5zriq0xazqqmd834z"))))
6194+
(build-system cargo-build-system)
6195+
(arguments
6196+
`(#:cargo-inputs
6197+
(("rust-jemalloc-sys" ,rust-jemalloc-sys-0.1)
6198+
("rust-libc" ,rust-libc-0.2))
6199+
#:phases
6200+
(modify-phases %standard-phases
6201+
(add-after 'configure 'override-jemalloc
6202+
(lambda* (#:key inputs #:allow-other-keys)
6203+
(let ((jemalloc (assoc-ref inputs "jemalloc")))
6204+
(setenv "JEMALLOC_OVERRIDE"
6205+
(string-append jemalloc "/lib/libjemalloc_pic.a")))
6206+
#t)))))
6207+
(native-inputs
6208+
`(("jemalloc" ,jemalloc)))))
6209+
61806210
(define-public rust-json-0.11
61816211
(package
61826212
(name "rust-json")

0 commit comments

Comments
 (0)