diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2024-11-20 20:37:46 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2024-11-28 11:05:31 +0200 |
commit | d4ceb6ac11324122a712fa2657f950bd4bd1ae93 (patch) | |
tree | c6f1470c610651ee951ef635f36ced09173b5dda | |
parent | 88f8474586ac2de7c2669c417f76828bcc2b88ea (diff) | |
download | guix-d4ceb6ac11324122a712fa2657f950bd4bd1ae93.tar guix-d4ceb6ac11324122a712fa2657f950bd4bd1ae93.tar.gz |
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: Ia362b7f1c1308f54baaa3c9239a2d780e02f4cef
-rw-r--r-- | gnu/packages/crates-io.scm | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 1183efc6cb..9d933c43ce 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -84400,34 +84400,62 @@ system.") ("rust-ordered-float" ,rust-ordered-float-1) ("rust-threadpool" ,rust-threadpool-1)))))) +(define-public rust-tikv-jemalloc-sys-0.6 + (package + (name "rust-tikv-jemalloc-sys") + (version "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7") + (source + (origin + (method url-fetch) + (uri (crate-uri "tikv-jemalloc-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0baf5vjpg9ipa388md4yxim77rdblnk8r95mnp1akbqjcj860g6d")) + (modules '((guix build utils))) + (snippet + '(begin (delete-file-recursively "jemalloc"))))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-cc" ,rust-cc-1) + ("rust-libc" ,rust-libc-0.2)) + #: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 FFI bindings to jemalloc") + (description "This package provides a Rust FFI bindings to jemalloc.") + (license (list license:expat license:asl2.0)))) + (define-public rust-tikv-jemalloc-sys-0.4 (package + (inherit rust-tikv-jemalloc-sys-0.6) (name "rust-tikv-jemalloc-sys") (version "0.4.1+5.2.1-patched") (source (origin (method url-fetch) (uri (crate-uri "tikv-jemalloc-sys" version)) - (file-name - (string-append name "-" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1lw6gy9gzk7g7h71nm8a5ybrilhqgr583mn80nslr78p0ldk69la")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "jemalloc"))))) - (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-cc" ,rust-cc-1) ("rust-fs-extra" ,rust-fs-extra-1) - ("rust-libc" ,rust-libc-0.2)))) - (home-page - "https://github.com/tikv/jemallocator") - (synopsis "Rust FFI bindings to jemalloc") - (description "This package provides a Rust FFI bindings to jemalloc.") - (license (list license:expat license:asl2.0)))) + ("rust-libc" ,rust-libc-0.2)))))) (define-public rust-tikv-jemallocator-0.4 (package |