Add bcnc

Evgeny PisemskySun Jan 12 14:10:15+0300 2025

3d1f88f

Add bcnc

modules/cogd/packages/engineering.scm

55
(define-module (cogd packages engineering))
66
77
(use-modules (guix packages)
8+
             (guix download)
89
             (guix git-download)
9-
             ((gnu packages engineering) #:prefix guix:))
10+
             (guix build-system python)
11+
             (guix build-system pyproject)
12+
             ((guix licenses) #:prefix license:)
13+
             ((gnu packages engineering) #:prefix guix:)
14+
             (gnu packages image-processing)
15+
             (gnu packages python)
16+
             (gnu packages python-build)
17+
             (gnu packages python-xyz)
18+
             (cogd packages python-xyz))
1019
1120
(define-public pcb2gcode
1221
  (let ((commit "8c084afd00c6653dfa9cbf24a1dbeeb24f592aa9")

2433
         (sha256
2534
          (base32
2635
           "19hyzd1601l51bwlv43j8l602nfacbjwqf54m5xsmj50718bcks2")))))))
36+
37+
(define-public bcnc
38+
  (package
39+
    (name "bcnc")
40+
    (version "0.9.15")
41+
    (source
42+
     (origin
43+
       (method url-fetch)
44+
       (uri (pypi-uri "bCNC" version))
45+
       (sha256
46+
        (base32 "1wsz5ppgncn992znj9wpkvjkf87m93zb2pdzlas53nnj2j4pz9vw"))
47+
       ;; Comment out opencv-python which cannot be detected because
48+
       ;; the opencv python library lacks necessary metadata files.
49+
       ;; https://github.com/opencv/opencv-python/issues/944
50+
       (modules '((guix build utils)))
51+
       (snippet '(substitute* "setup.py"
52+
                   (("\"opencv-python.*" line)
53+
                    (string-append "# " line))
54+
                   (("\\+.*" line)
55+
                    (string-append "# " line))))))
56+
    (build-system pyproject-build-system)
57+
    ;; Tests require pyautogui which is not packaged yet.
58+
    (arguments
59+
     (list
60+
      #:tests? #f))
61+
    (native-inputs (list python-setuptools python-wheel))
62+
    (inputs (list `(,python "tk")))
63+
    (propagated-inputs (list opencv
64+
                             python-numpy
65+
                             python-pillow
66+
                             python-pyserial
67+
                             python-shxparser
68+
                             python-svgelements))
69+
    (home-page "https://github.com/vlachoudis/bCNC")
70+
    (synopsis "Swiss army knife for all your CNC/g-code needs")
71+
    (description
72+
     "GrblHAL CNC command sender, autoleveler, g-code editor, digitizer, CAM
73+
and swiss army knife for all your CNC needs.  The sender is robust and
74+
fast able to work nicely with old or slow hardware.")
75+
    (license (list license:gpl2+ license:bsd-3 license:expat))))