aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-11-20 20:38:24 +0200
committerEfraim Flashner <efraim@flashner.co.il>2024-11-28 11:05:32 +0200
commit556442adb1958fe8e80215bd8706bce6fefa42e8 (patch)
tree2aaf4a0bd6500dbeffe1207bbb931a8e3a1dda5b
parentd4ceb6ac11324122a712fa2657f950bd4bd1ae93 (diff)
downloadguix-556442adb1958fe8e80215bd8706bce6fefa42e8.tar.gz
guix-556442adb1958fe8e80215bd8706bce6fefa42e8.zip
gnu: Add rust-tikv-jemallocator-0.6.
* gnu/packages/crates-io.scm (rust-tikv-jemallocator-0.6): New variable. (rust-tikv-jemallocator-0.4): Inherit from rust-tikv-jemallocator-0.6. Change-Id: Ib2a6f1a77f5a32c77261aa8614e2dfad0022a950
-rw-r--r--gnu/packages/crates-io.scm48
1 files changed, 36 insertions, 12 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 9d933c43ce..2c53b161ee 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -84457,33 +84457,57 @@ system.")
("rust-fs-extra" ,rust-fs-extra-1)
("rust-libc" ,rust-libc-0.2))))))
+(define-public rust-tikv-jemallocator-0.6
+ (package
+ (name "rust-tikv-jemallocator")
+ (version "0.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "tikv-jemallocator" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0r985npb7d9hrbs3mb0bkfbv0nvzjpgvzsbpyj21bn0qhpqmzv2c"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:tests? #f ; use of undeclared crate or module `tikv_jemalloc_ctl`
+ #:cargo-inputs (("rust-libc" ,rust-libc-0.2)
+ ("rust-tikv-jemalloc-sys" ,rust-tikv-jemalloc-sys-0.6))
+ #:cargo-development-inputs (("rust-paste" ,rust-paste-1))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'override-jemalloc
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jemalloc (assoc-ref inputs "jemalloc")))
+ ;; This flag is needed when not using the bundled jemalloc.
+ ;; https://github.com/tikv/jemallocator/issues/19
+ (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
+ (setenv "JEMALLOC_OVERRIDE"
+ (string-append jemalloc "/lib/libjemalloc_pic.a"))))))))
+ (inputs (list jemalloc))
+ (home-page "https://github.com/tikv/jemallocator")
+ (synopsis "Rust allocator backed by jemalloc")
+ (description "This package provides a Rust allocator backed by jemalloc.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-tikv-jemallocator-0.4
(package
+ (inherit rust-tikv-jemallocator-0.6)
(name "rust-tikv-jemallocator")
(version "0.4.1")
(source
(origin
(method url-fetch)
(uri (crate-uri "tikv-jemallocator" version))
- (file-name
- (string-append name "-" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1pyc94yx74s3vxnr22gnpj0b2f87s0vql0c5ayy1b1zb0jkaa51w"))))
- (build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs
(("rust-libc" ,rust-libc-0.2)
- ("rust-tikv-jemalloc-sys"
- ,rust-tikv-jemalloc-sys-0.4))))
- (home-page
- "https://github.com/tikv/jemallocator")
- (synopsis
- "Rust allocator backed by jemalloc")
- (description
- "This package provides a Rust allocator backed by jemalloc.")
- (license (list license:expat license:asl2.0))))
+ ("rust-tikv-jemalloc-sys" ,rust-tikv-jemalloc-sys-0.4))))))
(define-public rust-tikv-jemalloc-ctl-0.4
(package