guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

226/276: gnu: rust-libmimalloc-sys-0.1: Update to 0.1.35.


From: guix-commits
Subject: 226/276: gnu: rust-libmimalloc-sys-0.1: Update to 0.1.35.
Date: Wed, 18 Oct 2023 04:50:18 -0400 (EDT)

efraim pushed a commit to branch rust-team
in repository guix.

commit 340b6f97c56280f1bc409f7386482bdee4f69427
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon Oct 9 09:41:19 2023 +0300

    gnu: rust-libmimalloc-sys-0.1: Update to 0.1.35.
    
    * gnu/packages/crates-io.scm (rust-libmimalloc-sys-0.1): Update to
    0.1.35.
    [source]: Add snippet to override the build.rs file.
    [cargo-inputs]: Add rust-cc-1, rust-libc-0.2, rust-pkg-config-0.3.
    Remove rust-cmake-0.1.
    [native-inputs]: Remove cmake-minimal.
    [inputs]: Add mimalloc.
---
 gnu/packages/crates-io.scm | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a6ac111125..9021adf5c2 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -36478,7 +36478,7 @@ functions and static variables these libraries 
contain.")
 (define-public rust-libmimalloc-sys-0.1
   (package
     (name "rust-libmimalloc-sys")
-    (version "0.1.18")
+    (version "0.1.35")
     (source
      (origin
        (method url-fetch)
@@ -36486,17 +36486,28 @@ functions and static variables these libraries 
contain.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0bbm03687j9fspvk6nqspmjlvchlvbxydl0mrc1x9i1k6kqiy5c2"))
+         "0r4nrd9xbmhmipw4bvh4xlbzbc7xf74frrsibqglysffgv1vay9r"))
        (modules '((guix build utils)))
        (snippet
-        '(begin (delete-file-recursively "c_src/mimalloc/bin")))))
+        '(begin (substitute* "Cargo.toml"
+                  (("\\[build-dependencies\\.cc\\]" all)
+                   (string-append "[build-dependencies.pkg-config]\n"
+                                  "version = \"0.3\"\n\n"
+                                  all)))
+                (delete-file "build.rs")
+                (with-output-to-file "build.rs"
+                  (lambda _
+                    (format #t "fn main() {~@
+                            println!(\"cargo:rustc-link-lib=mimalloc\");~@
+                            }~%")))))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
-       (("rust-cty" ,rust-cty-0.2)
-        ("rust-cmake" ,rust-cmake-0.1))))
-    (native-inputs
-     `(("cmake" ,cmake-minimal)))
+       (("rust-cc" ,rust-cc-1)
+        ("rust-cty" ,rust-cty-0.2)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-pkg-config" ,rust-pkg-config-0.3))))
+    (inputs (list mimalloc))
     (home-page "https://github.com/purpleprotocol/mimalloc_rust";)
     (synopsis "Sys crate wrapping the mimalloc allocator")
     (description "This package provides a sys crate wrapping the mimalloc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]