Subject: [PATCH 2/2] gnu: Add bcnc.

From: Evgeny Pisemsky <[email-masked]>
Date: Sun, 19 Jan 2025 23:17:48 +0300

>From 2ed34b3352d4f0cef5a38e11db962a7081cc3ba9 Mon Sep 17 00:00:00 2001
Message-ID: <[email-masked]>
In-Reply-To: <[email-masked]>
References: <[email-masked]>
From: Evgeny Pisemsky <[email-masked]>
Date: Sun, 19 Jan 2025 23:00:12 +0300
Subject: [PATCH 2/2] gnu: Add bcnc.

* gnu/packages/engineering.scm (bcnc): New variable.

Change-Id: If72638b7772ec4304bca0ea18fd3f1a57f61512f
---
 gnu/packages/engineering.scm | 40 ++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index f9c4ac9bbd..a2e5346080 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -4652,6 +4652,46 @@ (define-public xschem
       (home-page "https://xschem.sourceforge.io/stefan/index.html")
       (license license:gpl2+))))
 
+(define-public bcnc
+  (package
+    (name "bcnc")
+    (version "0.9.15")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "bCNC" version))
+       (sha256
+        (base32 "1wsz5ppgncn992znj9wpkvjkf87m93zb2pdzlas53nnj2j4pz9vw"))
+       ;; Comment out opencv-python which cannot be detected because
+       ;; the opencv python library lacks necessary metadata files.
+       ;; https://github.com/opencv/opencv-python/issues/944
+       (modules '((guix build utils)))
+       (snippet '(substitute* "setup.py"
+                   (("\"opencv-python.*" line)
+                    (string-append "# " line))
+                   (("\\+.*" line)
+                    (string-append "# " line))))))
+    (build-system pyproject-build-system)
+    ;; Tests require pyautogui which is not packaged yet.
+    (arguments
+     (list
+      #:tests? #f))
+    (native-inputs (list python-setuptools python-wheel))
+    (inputs (list `(,python "tk")))
+    (propagated-inputs (list opencv
+                             python-numpy
+                             python-pillow
+                             python-pyserial
+                             python-shxparser
+                             python-svgelements))
+    (home-page "https://github.com/vlachoudis/bCNC")
+    (synopsis "Swiss army knife for all your CNC/g-code needs")
+    (description
+     "GrblHAL CNC command sender, autoleveler, g-code editor, digitizer, CAM
+and swiss army knife for all your CNC needs.  The sender is robust and
+fast able to work nicely with old or slow hardware.")
+    (license (list license:gpl2+ license:bsd-3 license:expat))))
+
 (define-public candle
   ;; The latest tagged version 1.2b fails on the build stage due to
   ;; non-supported g++ flags so we need to use the latest commit from the
-- 
2.47.1