summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-01-21 18:32:03 +0200
committerEfraim Flashner <efraim@flashner.co.il>2020-01-21 18:32:03 +0200
commit5e2ce6afad34cf9faa167406c9b8bd8eac68c078 (patch)
treee228e2aefba2df56af4bc6dc05dfb7b612a7fa98 /gnu
parent45ad04e72182aafcf3f4b7c67deb998aac3b98b4 (diff)
downloadguix-5e2ce6afad34cf9faa167406c9b8bd8eac68c078.tar.gz
gnu: rust-jemalloc-sys-0.3: Don't hide package.
* gnu/packages/crates-io.scm (rust-jemalloc-sys-0.3)[arguments]: Add
rust-libc-0.2, rust-cc-1.0, rust-fs-extra-1.1 to cargo-inputs. Add
custom phase to delete vendored sources.
[native-inputs]: Add jemalloc.
[properties]: Remove field.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/crates-io.scm35
1 files changed, 22 insertions, 13 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index af58c09290..04a9b49ba5 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -27,6 +27,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages tls)
@@ -5331,22 +5332,30 @@ wasm-bindgen crate.")
          (base32
           "0ify9vlql01qhfxlj7d4p9jvcp90mj2h69nkbq7slccvbhzryfqd"))))
     (build-system cargo-build-system)
-    ;(arguments
-    ; `(#:phases
-    ;   (modify-phases %standard-phases
-    ;     (add-after 'unpack 'override-jemalloc
-    ;       (lambda* (#:key inputs #:allow-other-keys)
-    ;         (let ((jemalloc (assoc-ref inputs "jemalloc")))
-    ;           (delete-file-recursively "jemalloc")
-    ;           (setenv "JEMALLOC_OVERRIDE"
-    ;                   (string-append jemalloc "/lib/libjemalloc_pic.a")))
-    ;         #t)))))
-    ;(inputs
-    ; `(("jemalloc" ,jemalloc)))
+    (arguments
+     `(#:cargo-inputs
+       (("rust-libc" ,rust-libc-0.2)
+        ;; Build dependencies:
+        ("rust-cc" ,rust-cc-1.0)
+        ("rust-fs-extra" ,rust-fs-extra-1.1))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'override-jemalloc
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((jemalloc (assoc-ref inputs "jemalloc")))
+               (delete-file-recursively "jemalloc")
+               (delete-file-recursively
+                 (string-append "guix-vendor/rust-jemalloc-sys-"
+                                ,(package-version rust-jemalloc-sys-0.3)
+                                ".crate/jemalloc"))
+               (setenv "JEMALLOC_OVERRIDE"
+                       (string-append jemalloc "/lib/libjemalloc_pic.a")))
+             #t)))))
+    (native-inputs
+     `(("jemalloc" ,jemalloc)))
     (home-page "https://github.com/gnzlbg/jemallocator")
     (synopsis "Rust FFI bindings to jemalloc")
     (description "This package provides Rust FFI bindings to jemalloc.")
-    (properties '((hidden? . #t)))
     (license (list license:asl2.0
                    license:expat))))