unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#52116] [PATCH 2/2] gnu: Add printrun.
       [not found] <20211126005847.29607-1-Morgan.J.Smith@outlook.com>
@ 2021-11-26  0:58 ` Morgan.J.Smith
  0 siblings, 0 replies; only message in thread
From: Morgan.J.Smith @ 2021-11-26  0:58 UTC (permalink / raw)
  To: 52116; +Cc: Morgan Smith

From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/printers.scm (printrun): New variable.
---
 gnu/packages/printers.scm | 66 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/gnu/packages/printers.scm b/gnu/packages/printers.scm
index 619a2750e0..91ab1a0dfb 100644
--- a/gnu/packages/printers.scm
+++ b/gnu/packages/printers.scm
@@ -25,6 +25,7 @@ (define-module (gnu packages printers)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system cmake)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages compression)
@@ -32,6 +33,7 @@ (define-module (gnu packages printers)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages python-science)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages gcc)
@@ -46,6 +48,8 @@ (define-module (gnu packages printers)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages qt))
 
@@ -288,3 +292,65 @@ (define-public slic3rapp
     (synopsis "")
     (description "")
     (license #f)))
+
+(define-public printrun
+  (package
+    (name "printrun")
+    (version "2.0.0rc8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/kliment/Printrun")
+             (commit (string-append "printrun-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bvwrfhmn2km03fp343bd9ddjxv8sp3d0qdxk786rflw4yksbxgn"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "requirements.txt"
+               (("== 4.1.0") ">= 4.0.0") ;; wxPython
+               (("dbus-python.*") "")) ;; Not sure why it can't find dbus-python
+             (delete-file "printrun/power/osx.py")
+             (delete-file "printrun/packer.py") ;; Uses a non-free library
+
+             ;; Changing the value of python variables
+             (substitute* "printrun/utils.py"
+               (("shared_pronterface_images_dir = .*")
+                (string-append "shared_pronterface_images_dir = \"" (assoc-ref outputs "out")
+                               "/share/pronterface/images\"\n"))
+               (("shared_pixmaps_dir = .*")
+                (string-append "shared_pixmaps_dir = \"" (assoc-ref outputs "out")
+                               "/share/pixmaps\"\n"))
+               (("shared_pronterface_dir = .*")
+                (string-append "shared_pixmaps_dir = \"" (assoc-ref outputs "out")
+                               "/share/pronterface\"\n")))))
+         (add-before 'check 'setup-display
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               (system "Xvfb :1 &")
+               (setenv "DISPLAY" ":1")))))))
+    (inputs
+     `(("python-appdirs" ,python-appdirs)
+       ("python-cairocffi" ,python-cairocffi)
+       ("python-cairosvg" ,python-cairosvg)
+       ("python-cffi" ,python-cffi)
+       ("python-dbus" ,python-dbus)
+       ("python-lxml" ,python-lxml)
+       ("python-numpy" ,python-numpy)
+       ("python-psutil" ,python-psutil)
+       ("python-pyglet" ,python-pyglet)
+       ("python-pyserial" ,python-pyserial)
+       ("python-wxpython" ,python-wxpython)))
+    (native-inputs
+     `(("python-cython" ,python-cython)
+       ("xvfb" ,xorg-server-for-tests)))
+    (home-page "https://github.com/kliment/Printrun/")
+    (synopsis "Printrun is a full suite of host interfaces for 3D printers and CNC")
+    (description "Printrun consists of printcore, pronsole and pronterface, and a small
+collection of helpful scripts.")
+    (license license:gpl3+)))
-- 
2.34.0





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-26  1:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211126005847.29607-1-Morgan.J.Smith@outlook.com>
2021-11-26  0:58 ` [bug#52116] [PATCH 2/2] gnu: Add printrun Morgan.J.Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).