From patchwork Mon Sep 5 19:57:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristian Lein-Mathisen X-Patchwork-Id: 42231 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0E5CB27BBEA; Mon, 5 Sep 2022 20:59:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E951427BBE9 for ; Mon, 5 Sep 2022 20:59:39 +0100 (BST) Received: from localhost ([::1]:32872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVIFv-0006yX-2X for patchwork@mira.cbaines.net; Mon, 05 Sep 2022 15:59:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVIFK-0006YC-U1 for guix-patches@gnu.org; Mon, 05 Sep 2022 15:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVIFK-00011C-HQ for guix-patches@gnu.org; Mon, 05 Sep 2022 15:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVIFK-0000uE-Di for guix-patches@gnu.org; Mon, 05 Sep 2022 15:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57361] [PATCH] gnu: Add solvespace. References: In-Reply-To: Resent-From: Kristian Lein-Mathisen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Sep 2022 19:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57361 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57361@debbugs.gnu.org Received: via spool by 57361-submit@debbugs.gnu.org id=B57361.16624078963392 (code B ref 57361); Mon, 05 Sep 2022 19:59:02 +0000 Received: (at 57361) by debbugs.gnu.org; 5 Sep 2022 19:58:16 +0000 Received: from localhost ([127.0.0.1]:49015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVIEZ-0000sd-H3 for submit@debbugs.gnu.org; Mon, 05 Sep 2022 15:58:16 -0400 Received: from mail-oa1-f51.google.com ([209.85.160.51]:40560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVIEX-0000sO-D9 for 57361@debbugs.gnu.org; Mon, 05 Sep 2022 15:58:14 -0400 Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-1278a61bd57so4997921fac.7 for <57361@debbugs.gnu.org>; Mon, 05 Sep 2022 12:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=A1F3jhNMYjM2FTbH+6Rvd9KyOukPv35Gos2nd4olxeM=; b=NHpgwaTXmS3+krDrOsnkZzeODuwHSD++W5yt6BUep+doQjF6kRF6yDnUBjcZFO7gOB W7WqQGUMb9FWjchAeavPK9ET/jzJD0ST11QeeMjFT/kQktXrcff5xjmThNlq77DELN/e HiHiJZveOE7Q7pyD49oNn0Vx4WzZHvUlnYnzwhP3CZeusO1A53SU7K0rJ5/RJ2EuWF5a oWWgsaK3vvljhePH1wZtcoEAdz5lieezFhX3+5m7oqfHRTieR4+t4E/ubjcTp3KDvAz4 WzNpG+GH1/POwPOhWlCplO60c7ycdj9pgHzTiE2iLCDpRH9VGmXit3+3mW+PfiAN5KgG 8HJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=A1F3jhNMYjM2FTbH+6Rvd9KyOukPv35Gos2nd4olxeM=; b=BCCzE37on4dNz3Ze66FVHVvQ/D4oKsNsPxrNrsBZjoiYgxh9/myRPksHaw5NssAALH N8SpQfuoX5gUOX9nnKvpcUbI9cDDirdL6L2Du8mK/In7fN+nQ5QP+ZANGwxNWYj/cIU0 Z7sbckUqDNKK4K+Yd3xuMEograVjrk/2Kbh3CxFbY3XxrTCr31pbMrqeCu9d9Rc/DtKu pk4T02AXaGvDe8bX6gyKx3Qf+C+k4yVQ6nZLnlocQrfMsyrQtP12wbR7Qjjs0THfaU8+ 91W7lcPn+leDL2HWbMScVXA5ZMtb9oYI2sJcXBaZgasSzV7MduczQmZTZtkqxNYW22RW DDbg== X-Gm-Message-State: ACgBeo2DAqvETzHh72B5w7W/QRvdtFGSghjrUSNQL2fZzqXVx0l/HulS uX2gHnQcBkG3xFK4GhvpIZUa7MhEVntFZtSsav17kLJp X-Google-Smtp-Source: AA6agR7sjk9wNr6tgoUbrr6yYkH15MfPgtUaIObicnPPG0A6Xtn3R6FjZPeBEpXrfLpy9TuZ+Fn0p2vUfuWbz1Nm4tU= X-Received: by 2002:a05:6808:14c8:b0:345:16a5:fc26 with SMTP id f8-20020a05680814c800b0034516a5fc26mr7966393oiw.246.1662407887744; Mon, 05 Sep 2022 12:58:07 -0700 (PDT) MIME-Version: 1.0 From: Kristian Lein-Mathisen Date: Mon, 5 Sep 2022 21:57:56 +0200 Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, And thanks for your feedback, Liliana. Here's another attempt! > > +(define mimalloc-for-solvespace > Given that this is the upstream mimalloc, there's no reason to make > this private or only for solvespace. Note that you should separate > this into one patch per package. > > + (let ((commit "f2712f4a8f038a7fb4df2790f4c3b7e3ed9e219b") > > + (version "2.0.6")) > This is the release commit, no reason to use git-version etc. here Done! I wasn't sure where to place this public mimalloc. I asked on #guix but go no replies, so I kept it right there in engineering.scm. > > + (synopsis "Compact general purpose allocator with excellent > > performance") > Don't bloat the synopsis with marketing terms; "General purpose > allocator" should probably suffice. Ah, of course. Fixed. > > + (define-public solvespace > > + (let ((commit "70bde63cb32a7f049fa56cbdf924e2695fcb2916") > > + (version "3.1") > I haven't checked, but is this the release commit? If so, no need for > all this verbosity. Unfortunately, the verbosity is needed. I need to reference the commit hash before the configure phase below. > > + (libdxfrw-sources (origin > > + (method git-fetch) > > + (uri (git-reference (url > > + "https://github.com/solvespace/libdxfrw") > > + (commit > > + "0b7b7b709d9299565db603f878214656ef5e9ddf"))) > > + (sha256 (base32 > > + "0d2wjq81466m3hb5cffiy99vhx0irwwy47yfxp318k2q4cvd5z2a"))))) > This should be its own variable. Unlike with mimalloc, since it's just > an origin, you can use the same patch as solvespace. Done, but here I'm curious - why does this deserve it's own top-level variable? It shouldn't to be referenced by anything other than inside SolveSpace. Could I have used a nested define inside solvespace instead? > > + (package (name "solvespace") > > + (version (git-version version "1" commit)) > > + (source (origin > > + (method git-fetch) > > + (uri (git-reference > > + (url "https://github.com/solvespace/solvespace") > > + (commit commit))) > > + (file-name (git-file-name name version)) > > + (sha256 > > + (base32 > > + "1hbdln44k00a6vlklv2mq2c9zda3i9d5x0f7ks85w4v6zskhqnra")))) > > + (build-system cmake-build-system) > > + (native-inputs (list pkg-config gettext-minimal)) > > + (arguments > > + (list #:build-type "Release" > > + #:phases #~(modify-phases %standard-phases > `guix style' is not yet perfect when it comes to trade-offs between > horizontal and vertical space. Prefer > (list > #:build-type "Release" > #:phases > #~(modify-phases ... Indentation fixed (by Emacs this time, not guix style). K. From 7602c8d01e7fce26551037304fa2c65f29e5c892 Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen Date: Mon, 5 Sep 2022 21:49:03 +0200 Subject: [PATCH 1/2] gnu: Add mimalloc. * gnu/packages/engineering.scm (mimalloc): New variable. --- gnu/packages/engineering.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index f195179413..5f5ef158a2 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -2895,6 +2895,28 @@ (define-public pcb2gcode dynamic calibration of the milling depth.") (license license:gpl3+)))) +;; Note there is another mimalloc used 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))) + (define-public syscall-intercept ;; Upstream provides no tag. Also, last version update is 4 years old. (let ((commit "304404581c57d43478438d175099d20260bae74e") base-commit: c4504dfb1da78f2f21fc5139a2fd5e82ed0ef21c -- 2.37.2