diff mbox series

[bug#57361] gnu: Add solvespace.

Message ID CAAGQtHwTqbP=3vr1Eccyjw7yi43kFsRwKnSu8wnOoxPY6GgR1g@mail.gmail.com
State Accepted
Headers show
Series [bug#57361] gnu: Add solvespace. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Kristian Lein-Mathisen Sept. 6, 2022, 8:30 a.m. UTC
Hi again,

unmatched-paren suggested to put mimalloc into c.scm on #guix, so here is
new set of patches to reflect that.

K.
diff mbox series

Patch

From a19e2d22f52b71db2ddc14b5dcaa6acb57c27484 Mon Sep 17 00:00:00 2001
From: Kristian Lein-Mathisen <kristianlein@gmail.com>
Date: Mon, 5 Sep 2022 21:49:03 +0200
Subject: [PATCH 1/2] gnu: Add mimalloc.

* gnu/packages/c.scm (mimalloc): New variable.
---
 gnu/packages/c.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index d7d649488b..10275970b1 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -1083,6 +1083,28 @@  (define-public aws-c-mqtt
     (home-page "https://github.com/awslabs/aws-c-mqtt")
     (license license:asl2.0)))
 
+;; Note: there is another mimalloc embedded in rust-mimalloc (version 1.6.4).
+(define-public mimalloc
+  (package
+    (name "mimalloc")
+    (version "2.0.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/microsoft/mimalloc")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "05x2dl3zimflfj91ns3vrphmzpdlyyr230p9adqgfds101f16qmv"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:build-type "Release"))
+    (synopsis "General purpose memory allocator")
+    (description "@code{mimalloc} is a drop-in replacement for @code{malloc}.")
+    (home-page "https://microsoft.github.io/mimalloc/")
+    (license license:expat)))
+
 ;;; Factored out of the ck package so that it can be adjusted and called on
 ;;; the host side easily, without impacting the package definition.
 (define (gnu-triplet->ck-machine target)

base-commit: c4504dfb1da78f2f21fc5139a2fd5e82ed0ef21c
-- 
2.37.2