From ed504a1280a347a072cb34e0f92ec271221534ae Mon Sep 17 00:00:00 2001 From: Daniel Khodabakhsh Date: Wed, 21 Jan 2026 21:27:15 -0800 Subject: [PATCH] gnu: Add rayforge. * gnu/packages/engineering.scm (rayforge): New variable. Change-Id: I13550eef3f42b0354d2cffe1c6e4324cdedcdbd5 --- gnu/packages/engineering.scm | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 3c383c87f3c..d1f8067e28f 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -47,6 +47,7 @@ ;;; Copyright © 2025 Janneke Nieuwenhuizen ;;; Copyright © 2025 Remco van 't Veer ;;; Copyright © 2025 bdunahu +;;; Copyright © 2026 Daniel Khodabakhsh ;;; ;;; This file is part of GNU Guix. ;;; @@ -169,6 +170,7 @@ #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages ruby-check) + #:use-module (gnu packages rust-apps) #:use-module (gnu packages sagemath) #:use-module (gnu packages serialization) #:use-module (gnu packages sqlite) @@ -2235,6 +2237,83 @@ like relocation symbols. It is able to deal with malformed binaries, making it suitable for security research and analysis.") (license license:lgpl3))) +(define-public rayforge + (package + (name "rayforge") + (version "0.28.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/barebaric/rayforge") + (commit version))) + (file-name (git-file-name name version)) + (sha256 (base32 "1yf4bhhvcg9haq481y41yfq0495qfi21xk8d2llcgwbdqil1mlvs")))) + (build-system pyproject-build-system) + (native-inputs (list + python-gitpython + python-pytest + python-pytest-asyncio + python-pytest-cov + python-pytest-mock + python-setuptools)) + (inputs (list + bash-minimal + libadwaita + opencv + python-aiohttp + python-asyncudp + python-blinker + python-ezdxf + python-numpy + python-platformdirs + python-pycairo + python-pyclipper + python-pygobject + python-pyopengl + python-pyopengl-accelerate + python-pypdf + python-pyserial-asyncio + python-pyvips + python-pyyaml + python-scipy + python-semver + python-svgelements + python-websockets + vtracer)) + (arguments (list + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'write-version-file (lambda _ + (call-with-output-file "rayforge/version.txt" + (lambda (port) + (display #$version port))) + (let ((port (open-file "MANIFEST.in" "a"))) + (display "include rayforge/version.txt\n" port) + (close-port port)))) + (add-after 'unpack 'fix-tests (lambda _ + (mkdir "tmp-home") + (setenv "HOME" (string-append (getcwd) "/tmp-home")) + ; Fix abstract class test for older Python error message format + (substitute* "tests/pipeline/stage/test_base_stage.py" + (("without an implementation for abstract method 'reconcile'") + "abstract method '?reconcile'?")) + ; Fix arc fitting test - add looser tolerance for floating point comparison + (substitute* "tests/core/geo/test_fitting.py" + (("assert np\\.allclose\\(\\(cmd\\[COL_I\\], cmd\\[COL_J\\]\\), \\(-10\\.0, 0\\.0\\)\\)") + "assert np.allclose((cmd[COL_I], cmd[COL_J]), (-10.0, 0.0), atol=1e-3)")))) + (delete 'sanity-check) ; Tests against python package version of rayforge + (add-after 'wrap 'wrap-rayforge + (lambda _ + (wrap-program + (string-append #$output "/bin/rayforge") + `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))))))) + (home-page "https://github.com/barebaric/rayforge") + (synopsis "Desktop application for laser cutting and engraving") + (description "Rayforge is a modern, cross-platform 2D CAD and G-code control +software designed for GRBL-based laser cutters and engravers. It features a +polished interface built using GTK4 and Libadwaita, with support for SVG, DXF, +PDF, and various image formats.") + (license license:expat))) + (define-public zycore (package (name "zycore")