From patchwork Tue Aug 23 12:08:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kristian Lein-Mathisen X-Patchwork-Id: 41883 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 8594A27BBEA; Tue, 23 Aug 2022 18:33:33 +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 C290E27BBE9 for ; Tue, 23 Aug 2022 18:33:32 +0100 (BST) Received: from localhost ([::1]:58978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQXmN-0005Tr-V6 for patchwork@mira.cbaines.net; Tue, 23 Aug 2022 13:33:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQXj1-0003kr-6M for guix-patches@gnu.org; Tue, 23 Aug 2022 13:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQXj0-0003w1-U2 for guix-patches@gnu.org; Tue, 23 Aug 2022 13:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQXj0-00015T-Pa for guix-patches@gnu.org; Tue, 23 Aug 2022 13:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57361] [PATCH] gnu: Add solvespace. Resent-From: Kristian Lein-Mathisen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Aug 2022 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57361 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57361@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16612757504050 (code B ref -1); Tue, 23 Aug 2022 17:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Aug 2022 17:29:10 +0000 Received: from localhost ([127.0.0.1]:44974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQXi9-00013G-VN for submit@debbugs.gnu.org; Tue, 23 Aug 2022 13:29:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:57896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQSi7-0000iY-AS for submit@debbugs.gnu.org; Tue, 23 Aug 2022 08:08:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQSi6-0005O4-Dd for guix-patches@gnu.org; Tue, 23 Aug 2022 08:08:47 -0400 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]:46721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQSi4-0007tV-4O for guix-patches@gnu.org; Tue, 23 Aug 2022 08:08:46 -0400 Received: by mail-oo1-xc33.google.com with SMTP id d63-20020a4a5242000000b0044880019622so2391350oob.13 for ; Tue, 23 Aug 2022 05:08:43 -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; bh=vaRLsTbMYpB+qmn9L6EasKJ3r59pW1f3xwvsHHlOMBQ=; b=VuRovWQltUjDBnTvtrxsjh3mom95zSk1wweSRCxVDmfh13mWlyDaD97CLe6EZVdU4H cZ+W6Lub9kuGr/3AGrNfDxxqKA7qRrphkLNR0pDxAlewkAvBcsX9kpmVKDjhip21TppR JxRZRjgpTB8CgPNNUKOuqibP2gVEGTFEuWf51aFW4jA/JH+d1oHL3c3wd9q39vHCknyQ wDr2wRrRUHOod9ByqwzCy1TIjXs7cvWIBk22lQxhJvOPloOE1wmdFKEpaOKVZ9wqFe1t 9PCg3KcF31mpmcF0hKpAPEbyG2WW0i08NT/s1W1sVBJU9pH9AWbfLk44lHfVXc7ljbJo AZeQ== 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; bh=vaRLsTbMYpB+qmn9L6EasKJ3r59pW1f3xwvsHHlOMBQ=; b=NaUIDAq3A1gKWEJI34yYmF6UVdwm41ScCZpArI50HpXib1FT7UiYNccHTjUKSck8SL i7HgSlYHAybDMs0+05UIxLq46kqPl0kaawjK+OZGVuoD4sBaVcvzBdW4b1JwXsWZONqO 52HDqz2fWoxd1uk0ptEZXnEJsQoe57WtoyfoG6hTdV8o29aF5yCaKaTBMDz5X6n6F9BB 3nxPSZ374Hu47k495mWGexFKca70Hz8tcmB+JtJoKqGD7HpkFB5eKybdHvlprg3A0q16 +gqFIBZX/21hTYxeOiEWwoZvgnjY8PKBaaX4dDf7QJgUOvf+Tr3kaSLt8sALz1yvkjJM 2tDQ== X-Gm-Message-State: ACgBeo3qaK4DmXgyWQg+VzBcfjfmSTauvUnWMvu6kBhNg3M3duiTrXgI 4a0/vIwFVOgTLKLLoEHi0g+gfsQnvaZgzu0TqFuyVPMM X-Google-Smtp-Source: AA6agR6yI2oIDzWdE/WYrYARREZUmPnLN1Q52An5CPc9dppjW5quDKZ1XcIFUmoLAHJv8wq+f0NjvmNUxKE43tDHtgs= X-Received: by 2002:a4a:bf11:0:b0:436:1611:6b51 with SMTP id r17-20020a4abf11000000b0043616116b51mr7895395oop.18.1661256522286; Tue, 23 Aug 2022 05:08:42 -0700 (PDT) MIME-Version: 1.0 From: Kristian Lein-Mathisen Date: Tue, 23 Aug 2022 14:08:31 +0200 Message-ID: Received-SPF: pass client-ip=2607:f8b0:4864:20::c33; envelope-from=kristianlein@gmail.com; helo=mail-oo1-xc33.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 23 Aug 2022 13:29:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 23 Aug 2022 13:32:34 -0400 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 everyone, I'm new to Guix and I'm enjoying it very much so far. Here is my little contribution: a lightweight CAD package. I don't have a lot of experience with SolveSpace, so I haven't done any testing other than checking if export to DXF works and drawing some sketches. I think I've managed to follow the steps in the Submitting Patches guide. The package has a couple of TODO's though, mostly regarding extracting dependencies instead of building the git submodules in-place: - mimalloc This just points to Microsoft's upstream , very close to version 2.0.6. The only other use of mimalloc I found was rust-mimalloc, but it seems to be on version mimalloc 1.6.4. - dxfrw: I believe this is an independent fork , which is unlikely useful elsewhere. Please consider this for inclusion, Thank you. K. From e09bfd0058d35b3fd969ed4093cefeb6692715b0 Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen Date: Tue, 23 Aug 2022 12:45:49 +0200 Subject: [PATCH] gnu: Add solvespace. * gnu/packages/engineering.scm (solvespace): New variable. --- gnu/packages/engineering.scm | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index f195179413..47a723f329 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -2895,6 +2895,85 @@ (define-public pcb2gcode dynamic calibration of the milling depth.") (license license:gpl3+)))) +(define-public solvespace + (let ((commit "ab00823acc2920e45b89ec655e4c51d4b346e5d8") + (version "3.1")) + (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) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1qixcja3rrgm7qiwc8ydzqidifh3al9kyqgg15z27hcvjlkv70v4")))) + (build-system cmake-build-system) + (native-inputs (list pkg-config gettext-minimal)) + (arguments + `(#:build-type "Release" + #:tests? #f + #:phases (modify-phases %standard-phases + ;; CMakeLists will try to `git describe` by default, which doesn't + ;; work inside the temporary build dir. So we embed the commit hash + ;; as described in CMakeLists.txt's comments. + (add-before 'configure 'embed-git-commit-hash + (lambda _ + (substitute* "CMakeLists.txt" + (("include\\(GetGitCommitHash\\)") + (string-append "set(GIT_COMMIT_HASH " + ,commit ")"))))) + ;; TODO: only initialize the needed submodules, instead of + ;; initializing all (with recursive? #t) and then deleting most + (add-before 'configure 'delete-submodules + (lambda _ + (delete-file-recursively "extlib/angle") + (delete-file-recursively "extlib/cairo") + (delete-file-recursively "extlib/freetype") + ;; TODO: see if we can package upstream libdxfrw and use that + ;; instead + ;; (delete-file-recursively "extlib/libdxfrw") + ;; TODO: see if we can package upstream mimalloc and use that + ;; instead + ;; (delete-file-recursively "extlib/mimalloc") + (delete-file-recursively "extlib/libpng") + (delete-file-recursively "extlib/pixman") + (delete-file-recursively "extlib/si") + (delete-file-recursively "extlib/zlib")))))) + (inputs (list cairo + freetype + gtkmm-3 + json-c + libpng + libspnav + mesa + zlib)) + (synopsis "Parametric 2D/3D CAD") + (description + "SOLVESPACE is a free (GPLv3) 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+)))) + (define-public syscall-intercept ;; Upstream provides no tag. Also, last version update is 4 years old. (let ((commit "304404581c57d43478438d175099d20260bae74e") base-commit: 7c47fa25134a2111e596e96198d02644aedae459 -- 2.37.2