| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 |
|
| 23 | (define-module (gnu packages printers)
|
| 24 | #:use-module ((guix licenses) #:prefix license:)
|
| 25 | #:use-module (guix build-system cmake)
|
| 26 | #:use-module (guix build-system gnu)
|
| 27 | #:use-module (guix build-system go)
|
| 28 | #:use-module (guix build-system pyproject)
|
| 29 | #:use-module (guix gexp)
|
| 30 | #:use-module (guix git-download)
|
| 31 | #:use-module (guix packages)
|
| 32 | #:use-module (gnu packages dns)
|
| 33 | #:use-module (gnu packages gd)
|
| 34 | #:use-module (gnu packages gettext)
|
| 35 | #:use-module (gnu packages golang-xyz)
|
| 36 | #:use-module (gnu packages libffi)
|
| 37 | #:use-module (gnu packages libusb)
|
| 38 | #:use-module (gnu packages pkg-config)
|
| 39 | #:use-module (gnu packages python-build)
|
| 40 | #:use-module (gnu packages python-graphics)
|
| 41 | #:use-module (gnu packages python-xyz)
|
| 42 | #:use-module (gnu packages qt)
|
| 43 | #:use-module (gnu packages version-control)
|
| 44 | #:use-module (gnu packages wxwidgets)
|
| 45 | #:use-module (gnu packages xorg)
|
| 46 | #:use-module (gnu packages xml))
|
| 47 |
|
| 48 | |
| 49 | |
| 50 |
|
| 51 | (define-public ipp-usb
|
| 52 | (package
|
| 53 | (name "ipp-usb")
|
| 54 | (version "0.9.28")
|
| 55 | (source
|
| 56 | (origin
|
| 57 | (method git-fetch)
|
| 58 | (uri (git-reference
|
| 59 | (url "https://github.com/OpenPrinting/ipp-usb")
|
| 60 | (commit version)))
|
| 61 | (file-name (git-file-name name version))
|
| 62 | (sha256
|
| 63 | (base32 "068rfy8arjxhgwll46bfq0x3ypi05qjd6gv0zqynfrk2zcwn4f3y"))
|
| 64 | (snippet
|
| 65 | #~(begin (use-modules (guix build utils))
|
| 66 | (delete-file-recursively "vendor")))))
|
| 67 | (build-system go-build-system)
|
| 68 | (arguments
|
| 69 | (list
|
| 70 | #:install-source? #f
|
| 71 | #:import-path "github.com/OpenPrinting/ipp-usb"
|
| 72 | #:phases
|
| 73 | #~(modify-phases %standard-phases
|
| 74 | (add-after 'install 'install-manual-page
|
| 75 | (lambda* (#:key import-path #:allow-other-keys)
|
| 76 | (with-directory-excursion (string-append "src/" import-path)
|
| 77 | (let* ((man (string-append #$output "/share/man/man8")))
|
| 78 | (mkdir-p man)
|
| 79 | (invoke "go-md2man"
|
| 80 | "-in" "ipp-usb.8.md"
|
| 81 | "-out" (string-append man "/ipp-usb.8"))))))
|
| 82 | (add-after 'install 'install-udev-rules
|
| 83 | (lambda* (#:key import-path #:allow-other-keys)
|
| 84 | (with-directory-excursion (string-append "src/" import-path)
|
| 85 | (substitute* "systemd-udev/71-ipp-usb.rules"
|
| 86 | (("systemd") "shephard")
|
| 87 | ((", ENV\\{SYSTEMD_WANTS\\}\\+=\"ipp-usb.service\"") ""))
|
| 88 | (install-file "systemd-udev/71-ipp-usb.rules"
|
| 89 | (string-append #$output "/lib/udev/rules.d"))))))))
|
| 90 | (inputs
|
| 91 | (list avahi libusb))
|
| 92 | (native-inputs
|
| 93 | (list go-github-com-openprinting-goipp
|
| 94 | go-md2man
|
| 95 | pkg-config))
|
| 96 | (home-page "https://github.com/OpenPrinting/ipp-usb")
|
| 97 | (synopsis "HTTP reverse proxy, backed by the IPP-over-USB connection")
|
| 98 | (description
|
| 99 | "ipp-usb implements an HTTP reverse proxy, backed by the IPP-over-USB
|
| 100 | connection to the device. This is because IPP-over-USB implementations which
|
| 101 | simply relay a TCP connection to USB do not work.")
|
| 102 | (license license:bsd-2)))
|
| 103 |
|
| 104 | (define-public ptouch-print
|
| 105 | (package
|
| 106 | (name "ptouch-print")
|
| 107 | (version "1.6")
|
| 108 | (source
|
| 109 | (origin
|
| 110 | (method git-fetch)
|
| 111 | (uri (git-reference
|
| 112 | (url "https://git.familie-radermacher.ch/linux/ptouch-print.git")
|
| 113 | (commit (string-append "v" version))))
|
| 114 | (sha256
|
| 115 | (base32 "1pxi30a74azhzsl1wni2va4rkhlfn97qxmz4kryrj9xkvf55jv88"))
|
| 116 | (file-name (git-file-name name version))))
|
| 117 | (build-system cmake-build-system)
|
| 118 | (arguments
|
| 119 | '(#:tests? #f |
| 120 | #:phases (modify-phases %standard-phases
|
| 121 | (add-before 'configure 'patch-cmakefile
|
| 122 | (lambda _
|
| 123 | (substitute* "CMakeLists.txt"
|
| 124 | |
| 125 | (("set\\(CMAKE_INSTALL_PREFIX /usr\\)")
|
| 126 | "")
|
| 127 | |
| 128 | |
| 129 | (("if\\(EXISTS /etc/udev/rules.d\\)
|
| 130 | [[:blank:]]+install\\(FILES udev/.*?\\.rules DESTINATION /etc/udev/rules.d\\)
|
| 131 | [[:blank:]]+install\\(CODE \".*?\"\\)
|
| 132 | endif\\(\\)
|
| 133 | ")
|
| 134 | ""))))
|
| 135 | (add-after 'install 'install-udev-rules
|
| 136 | (lambda* (#:key outputs #:allow-other-keys)
|
| 137 | (let* ((out (assoc-ref outputs "out"))
|
| 138 | (rules (string-append out "/lib/udev/rules.d/")))
|
| 139 | (install-file
|
| 140 | "../source/udev/90-usb-ptouch-permissions.rules"
|
| 141 | rules)))))))
|
| 142 | (native-inputs (list gd git gettext-minimal libusb pkg-config))
|
| 143 | (synopsis "CLI tool to print labels on Brother P-Touch printers")
|
| 144 | (description
|
| 145 | "This package provides the command line tool @command{ptouch-print} to
|
| 146 | print labels on Brother P-Touch printers. It also contains udev rules for
|
| 147 | non-root access for the known P-Touch printers. This does not require CUPS
|
| 148 | to work as the printer is accessed directly via libusb.")
|
| 149 | (home-page "https://dominic.familie-radermacher.ch/projekte/ptouch-print/")
|
| 150 | (license license:gpl3)))
|
| 151 |
|
| 152 | (define-public robocut
|
| 153 | (package
|
| 154 | (name "robocut")
|
| 155 | (version "1.0.11")
|
| 156 | (source
|
| 157 | (origin
|
| 158 | (method git-fetch)
|
| 159 | (uri (git-reference
|
| 160 | (url "https://github.com/Timmmm/robocut")
|
| 161 | (commit (string-append "v" version))))
|
| 162 | (file-name (git-file-name name version))
|
| 163 | (sha256
|
| 164 | (base32 "0dp9cssyik63yvkk35s51v94a873x751iqg93qzd8dpqkmz5z8gn"))))
|
| 165 | (build-system gnu-build-system)
|
| 166 | (arguments
|
| 167 | (list
|
| 168 | #:phases
|
| 169 | #~(modify-phases %standard-phases
|
| 170 | (replace 'configure
|
| 171 | (lambda _
|
| 172 | (substitute* "Robocut.pro"
|
| 173 | (("/usr/") (string-append #$output "/")))
|
| 174 | (invoke "qmake" (string-append "PREFIX=" #$output)))))))
|
| 175 | (inputs
|
| 176 | (list libusb qtbase-5 qtsvg-5))
|
| 177 | (native-inputs
|
| 178 | (list pkg-config qtbase-5))
|
| 179 | (synopsis "Graphical program to drive plotting cutters")
|
| 180 | (description
|
| 181 | "Robocut is a simple graphical program that allows you to cut graphics
|
| 182 | with Graphtec and Sihouette plotting cutters using an SVG file as its input.")
|
| 183 | (home-page "http://robocut.org")
|
| 184 | (license license:gpl3+)))
|
| 185 |
|
| 186 | (define-public printrun
|
| 187 | (package
|
| 188 | (name "printrun")
|
| 189 | (version "2.2.0")
|
| 190 | (source
|
| 191 | (origin
|
| 192 | (method git-fetch)
|
| 193 | (uri (git-reference
|
| 194 | (url "https://github.com/kliment/Printrun")
|
| 195 | (commit (string-append "printrun-" version))))
|
| 196 | (file-name (git-file-name name version))
|
| 197 | (sha256
|
| 198 | (base32 "0imnpyc4w3xzm353fjmwig4a2yfm2nhagl1bib4871m014c4vli0"))))
|
| 199 | (build-system pyproject-build-system)
|
| 200 | (arguments
|
| 201 | (list
|
| 202 | #:test-backend #~'unittest
|
| 203 | #:test-flags #~(list "discover" "tests")
|
| 204 | #:phases
|
| 205 | #~(modify-phases %standard-phases
|
| 206 | (add-after 'unpack 'patch-files
|
| 207 | (lambda _
|
| 208 | (delete-file "printrun/power/osx.py")
|
| 209 | (delete-file "printrun/packer.py")
|
| 210 | (substitute* "printrun/utils.py"
|
| 211 | (("shared_pronterface_images_dir = .*")
|
| 212 | (string-append
|
| 213 | "shared_pronterface_images_dir = \""
|
| 214 | #$output "/share/pronterface/images\"\n"))
|
| 215 | (("shared_pixmaps_dir = .*")
|
| 216 | (string-append "shared_pixmaps_dir = \""
|
| 217 | #$output "/share/pixmaps\"\n"))
|
| 218 | (("shared_pronterface_dir = .*")
|
| 219 | (string-append "shared_pixmaps_dir = \""
|
| 220 | #$output
|
| 221 | "/share/pronterface\"\n")))))
|
| 222 | (add-before 'check 'setup-display
|
| 223 | (lambda* (#:key tests? #:allow-other-keys)
|
| 224 | (when tests?
|
| 225 | (system "Xvfb :1 &")
|
| 226 | (setenv "DISPLAY" ":1")))))))
|
| 227 | (native-inputs
|
| 228 | (list python-cython
|
| 229 | python-setuptools
|
| 230 | xorg-server-for-tests))
|
| 231 | (inputs
|
| 232 | (list python-dbus
|
| 233 | python-lxml
|
| 234 | python-numpy
|
| 235 | python-pillow
|
| 236 | python-platformdirs
|
| 237 | python-psutil
|
| 238 | python-puremagic
|
| 239 | python-pyglet-1
|
| 240 | python-pyserial
|
| 241 | python-wxpython))
|
| 242 | (home-page "https://github.com/kliment/Printrun/")
|
| 243 | (synopsis "Pronterface, Pronsole, and Printcore 3D printing host software")
|
| 244 | (description
|
| 245 | "Printrun consists of printcore, pronsole and pronterface, and a small
|
| 246 | collection of helpful scripts.")
|
| 247 | (license license:gpl3+)))
|