From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2DRsMTztEGNWJwEAbAwnHQ (envelope-from ) for ; Thu, 01 Sep 2022 19:34:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MLdGMTztEGPeJwEAauVa8A (envelope-from ) for ; Thu, 01 Sep 2022 19:34:52 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 532B8ACC6 for ; Thu, 1 Sep 2022 19:34:52 +0200 (CEST) Received: from localhost ([::1]:44450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTo5b-0003YF-HP for larch@yhetil.org; Thu, 01 Sep 2022 13:34:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTnqJ-0004D2-HF for guix-patches@gnu.org; Thu, 01 Sep 2022 13:19:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTnqJ-0002CI-8O for guix-patches@gnu.org; Thu, 01 Sep 2022 13:19:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTnqJ-0001Rc-3w for guix-patches@gnu.org; Thu, 01 Sep 2022 13:19:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57361] Solvespace package re-done Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Sep 2022 17:19:03 +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: Kristian Lein-Mathisen , 57361@debbugs.gnu.org Received: via spool by 57361-submit@debbugs.gnu.org id=B57361.16620527295517 (code B ref 57361); Thu, 01 Sep 2022 17:19:03 +0000 Received: (at 57361) by debbugs.gnu.org; 1 Sep 2022 17:18:49 +0000 Received: from localhost ([127.0.0.1]:44066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTnq5-0001Qv-Aj for submit@debbugs.gnu.org; Thu, 01 Sep 2022 13:18:49 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:38468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTnq3-0001Qg-4W for 57361@debbugs.gnu.org; Thu, 01 Sep 2022 13:18:48 -0400 Received: by mail-ed1-f68.google.com with SMTP id a36so19667069edf.5 for <57361@debbugs.gnu.org>; Thu, 01 Sep 2022 10:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc; bh=V8Dej/FlJVr0B2Mb2ZHQm4xxr4bDUSrlKlitMINwNCY=; b=lMi2UAuRTnrE2yoB+2UUq0wzp9U3RcsmpfTQKh3yuimlEavEXmjou68sqyN7p8lghc r6AhZKvJ99Ukej74z41dHErdWWjxHmMmCSNGb3Wy7hrRafdwsh1EqLiENRKOQ86uxNu0 LaKTSNqhtthUJd27iHpw4qgHxSeGvIi22HrY9YHNjjm8I6LNYON9Z1PtFd+mYVybgRuK KpqOOaNbsWvTMqg6/nzpDzneEtpFTV95Jlz0AtjK6n3v9dhfFewBKLd0u2Bwq/bM9c4t ieJLNWtO9SZTSLnKOUKVqSSnY1VcqGtQZFTUe3d5mYdREHu/OyOxqgDkPYn/wsjXFNEE 0H2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc; bh=V8Dej/FlJVr0B2Mb2ZHQm4xxr4bDUSrlKlitMINwNCY=; b=TBSTope5u7l+2zixt9TNrzuDBLYurEGMSJuDxEhAn6+OIO0NEvSutF+xSwDr8wjph6 ++CLYwlIQUuQ1/QhFmfRCSV1LFuIyQ7N63W+xKiDMlRUpEhdRLuvaLQN78iSu/V6xrTY n1Nsa8V3jnvF6BqnFAe6SmSYpEzy/7ozyXZOlDv6M4ullexMChdwLnTRlrRjypOFoPbY udYDpegPUeNHTuXHk2ZvsxQmZyItr0Q2eQIE1M+71YDsFXRxwg+C517+DgyPHPpauWtp 9jz4lvKI8S//+kDY03+5VC7rnhIynYvjfLPKwrWlioKWv9mzOEFkUJfIu4+xbkTRYJt2 ZziA== X-Gm-Message-State: ACgBeo3J0EBhHyJ6ax2VoUC7vYS2HZdFfh7hh+P+2EVbLOA2dUYgmlJC OD84Cohg3hBYu6vt5KTlvn8JNTnXum4= X-Google-Smtp-Source: AA6agR57V9jhCxmO+SFDz32HKTmSfbXDIbU/faH7wL9wx9zUkTul9Q4wV5yr2akuR29zrDL3BWmicw== X-Received: by 2002:a05:6402:4486:b0:448:de41:d582 with SMTP id er6-20020a056402448600b00448de41d582mr10833108edb.52.1662052721013; Thu, 01 Sep 2022 10:18:41 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id kw14-20020a170907770e00b0073d685a2985sm8757167ejc.108.2022.09.01.10.18.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 10:18:40 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Thu, 01 Sep 2022 19:18:37 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662053692; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=V8Dej/FlJVr0B2Mb2ZHQm4xxr4bDUSrlKlitMINwNCY=; b=ai0yX6vrRmO+yiWvN7y4JvBES36LEVjurVK+qwgdQf5LdLJrWYYHjCjtg4d9IHif2uypob OTsdi+l1TQNCedMZEgLUaVSXP9/gUK7GadofGbmXCpSJ6MzsnNlFeQRZoLgKFUJJXQ3V2H HFig2GOvqKLEFY/rEpgvP2krQkKzdXoEDaJb/bSsgLxPuP9eemnb/LDAZueVC39NpzTqzv kcSfulN78n2RbWDfjFg/PX/pfF4wYUXam0fp1L54mN+l7+11if5mhNxE4Mfbc85Y32ZMRr FI3/EXr5DtLXShHMACcZaRJn1zWj2GvRto+OjEzQ1tuiqwVaI1xEs9OuFEzY3w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662053692; a=rsa-sha256; cv=none; b=O8hhfcGhgcAYVwjLc1hiPmrbC561/+WdLNYVbkLoD3bp/oHWGSKLMXmNvShf81EBIy/Yfx miFFAsqOn3d10m7ihATnLRDye374B42y9dBElVnt6aL8C2ERg/ztV7WZJAn8cvVlVV3EIh e89qjtJfCEshH2GyHO5cqVG5/emDYILwI2hUrJp8HE1aocPmpvVxHL4tekdHMcKJmviSX1 2YvRZtbEvg2oReAR/kjDlJJYN5EbNZ1BGhbeIeZA80ztD8v+JmXUdwabWVdpHgUveTzNRj U9eOGR2gtXk36Gtz+dJ7lzqHZ9s3Myi5XT1htDUmFPvoXXeveocR2j2PDePqsA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lMi2UAuR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lMi2UAuR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 532B8ACC6 X-Spam-Score: 5.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: QvPam5AmfLNy Am Mittwoch, dem 31.08.2022 um 20:51 +0200 schrieb Kristian Lein- Mathisen: > ;; There is another mimalloc, used in rust-mimalloc. But it's on > mimalloc > +;; version 1.6.4. TODO: See if it's possible to re-use this package > by both. > +(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 > + (package > + (name "mimalloc-for-solvespace") > + (version (git-version version "1" commit)) > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/microsoft/mimalloc") > + (commit commit))) You can use (string-append "v" version) to check out the tag. > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + > "05x2dl3zimflfj91ns3vrphmzpdlyyr230p9adqgfds101f16qmv")))) > + (build-system cmake-build-system) > + (arguments > + `(#:build-type "Release")) > + (synopsis "Compact general purpose allocator with excellent > performance") Don't bloat the synopsis with marketing terms; "General purpose allocator" should probably suffice. > + (description "@code{mimalloc} is a drop-in replacement for > @code{malloc} .") The rest appears somewhat superfluous :) > + (home-page "https://microsoft.github.io/mimalloc/") > + (license license:expat)))) > +(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. > + ;; libdxfrw has no readme, no version release, no tags. > Initial > + ;; commit says "libdxfrw-0.6.3 import", but it shares no git > history > + ;; with "upstream" https://github.com/codelibs/libdxfrw. > Both are > + ;; difficult to package separately as they don't install > properly. > + ;; Copying in-tree instead of #:recursive #t to avoid > downloading the > + ;; other bigger dependencies which aren't needed. > + (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. > + (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 ... > + (add-after 'unpack 'unpack-libdxfrw > + (lambda _ > + (copy-recursively #$libdxfrw-sources > + "extlib/libdxfrw"))) > + (add-before 'configure 'embed-git-commit- > hash > + (lambda _ > + ;; `git describe` doesn't work here, > so embed > + ;; the commit hash directly in > CMakeLists.txt as > + ;; described instead. > + (substitute* "CMakeLists.txt" > + (("include\\(GetGitCommitHash\\)") > + (string-append "set(GIT_COMMIT_HASH > " > + #$commit ")"))))) > + (add-before 'configure 'use-packaged- > mimalloc > + (lambda _ > + (substitute* "CMakeLists.txt" > + (("message\\(STATUS \"Using in-tree > mimalloc\"\\)") > + "message(STATUS \"Using guix > packaged mimalloc\")") > + > (("add_subdirectory\\(extlib/mimalloc EXCLUDE_FROM_ALL\\)") > + "find_package(mimalloc > REQUIRED)"))))))) > + (inputs (list cairo > + eigen > + freetype > + gtkmm-3 > + json-c > + libpng > + libspnav ;spaceware > + mimalloc-for-solvespace > + mesa > + zlib)) > + (synopsis "Parametric 2D/3D CAD") > + (description > + "SOLVESPACE is a parametric 3D @acronym{CAD, > +Computer Aided Design} tool. Applications include: > + > +@itemize > +@item modeling 3d parts — draw with extrudes, revolves, helixes and > + Boolean (union / difference / intersection) operations > +@item modeling 2d parts — draw the part as a single section, > + and export DXF, PDF, SVG; use 3d assembly to verify fit > +@item 3d-printed parts — export the STL or other triangle mesh > + expected by most 3d printers > +@item preparing CAM data — export 2d vector art for a waterjet > + machine or laser cutter; or generate STEP or STL, for import > into > + third-party CAM software for machining > +@item mechanism design — use the constraint solver to simulate > planar > + or spatial linkages, with pin, ball, or slide joints > +@item plane and solid geometry — replace hand-solved trigonometry > and spreadsheets > + with a live dimensioned drawing > +@end itemize") > + (home-page "https://solvespace.com/") > + (license license:gpl3+)))) > + Cheers