Subject: [PATCH rust-team 2/8] gnu: rust-jemalloc-ctl-0.5: Use override-jemalloc phases.

From: Herman Rimm <[email-masked]>
Date: Wed, 25 Dec 2024 21:21:51 +0100

* gnu/packages/crates-io.scm (rust-jemalloc-ctl-0.5)[arguments]: Disable
parallel tests.  Use override-jemalloc.

Change-Id: I23718f05ffd3deeb0ea0f9b32412ae6b6f0692db
---
 gnu/packages/crates-io.scm | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index fb7710c5a9..5945fd0a72 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39239,16 +39239,8 @@ (define-public rust-jemalloc-ctl-0.5
                        ("rust-libc" ,rust-libc-0.2)
                        ("rust-paste" ,rust-paste-1))
        #:cargo-development-inputs (("rust-jemallocator" ,rust-jemallocator-0.5))
-       #: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"))))))))
+       #:parallel-tests? #f ; Tests fail non-deterministically.
+       #:phases ,override-jemalloc))
     (native-inputs (list jemalloc))
     (home-page "https://github.com/tikv/jemallocator")
     (synopsis "Wrapper over jemalloc's control and introspection APIs")
-- 
2.45.2