unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Morgan.J.Smith@outlook.com
To: 52116@debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>
Subject: [bug#52116] [PATCH 2/2] gnu: Add printrun.
Date: Thu, 25 Nov 2021 19:58:49 -0500	[thread overview]
Message-ID: <BYAPR05MB4023D4330B53BF414D91907EC5639@BYAPR05MB4023.namprd05.prod.outlook.com> (raw)
In-Reply-To: <20211126005847.29607-1-Morgan.J.Smith@outlook.com>

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





           reply	other threads:[~2021-11-26  1:00 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20211126005847.29607-1-Morgan.J.Smith@outlook.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR05MB4023D4330B53BF414D91907EC5639@BYAPR05MB4023.namprd05.prod.outlook.com \
    --to=morgan.j.smith@outlook.com \
    --cc=52116@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).