diff options
Diffstat (limited to 'gnu/packages/scanner.scm')
-rw-r--r-- | gnu/packages/scanner.scm | 112 |
1 files changed, 84 insertions, 28 deletions
diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 00d094cc4b..e7a5a2b210 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014 John Darrington <[email protected]> ;;; Copyright © 2015 Andy Wingo <[email protected]> ;;; Copyright © 2016 Andy Patterson <[email protected]> -;;; Copyright © 2017, 2019, 2020 Tobias Geerinckx-Rice <[email protected]> +;;; Copyright © 2017, 2019, 2020, 2022 Tobias Geerinckx-Rice <[email protected]> ;;; Copyright © 2018 Efraim Flashner <[email protected]> ;;; ;;; This file is part of GNU Guix. @@ -23,6 +23,7 @@ (define-module (gnu packages scanner) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages avahi) #:use-module (gnu packages compression) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) @@ -35,15 +36,70 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages textutils) + #:use-module (gnu packages tls) #:use-module (gnu packages xml) #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix gexp) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils)) +(define-public sane-airscan + (package + (name "sane-airscan") + (version "0.99.27") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alexpevzner/sane-airscan") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1syxsih1kdnz9slsg5a92bqnllagm4cybqk4n2y6mbkqn6h0zlnv")))) + (build-system gnu-build-system) + (arguments + (list #:make-flags + #~(list (string-append "prefix=" #$output) + (string-append "libdir=$(prefix)/lib")) + #:phases + #~(modify-phases %standard-phases + (delete 'configure )))) ; no configure script + (native-inputs + (list pkg-config)) + (inputs + (list avahi + gnutls + libjpeg-turbo + libpng + libxml2 + sane-backends)) + (home-page "https://github.com/alexpevzner/sane-airscan") + (synopsis "SANE backend for eSCL (AirScan) and WSD document scanners") + (description ; no @acronym{eSCL} because the meaning isn't officially known + "This SANE backend lets you scan documents and images from scanners and +multi-function printers that speak eSCL (marketed as ``AirScan'') or +@acronym{WSD, Web Services for Devices} (or ``WS-Scan''). + +Both are vendor-neutral protocols that allow ``driverless'' scanning over IPv4 +and IPv6 networks without the vendor-specific drivers that make up most of the +sane-backends collection. This is similar to how most contemporary printers +speak the universal @acronym{IPP, Internet Printing Protocol}. + +Only scanners that support eSCL will also work over USB. This requires a +suitable IPP-over-USB daemon like ipp-usb to be installed and configured. + +Any eSCL or WSD-capable scanner should just work. sane-airscan automatically +discovers and configures devices, including which protocol to use. It was +successfully tested with many devices from Brother, Canon, Dell, Kyocera, +Lexmark, Epson, HP, OKI, Panasonic, Pantum, Ricoh, Samsung, and Xerox, with both +WSD and eSCL.") + (license (list license:gpl2+ ; the combined work + license:expat)))) ; http_parser.[ch] + (define-public sane-backends-minimal (package (name "sane-backends-minimal") @@ -75,7 +131,7 @@ ;; For scripts/pixma_gen_options.py. ("python" ,python-wrapper))) (inputs - `(("libusb" ,libusb))) + (list libusb)) (arguments `(#:phases (modify-phases %standard-phases @@ -207,31 +263,31 @@ package contains the library and drivers."))) (base32 "0pvy4qirfjdfm8aj6x5rkbgl7hk3jfa2s21qkk8ic5dqfjjab75n")))) (build-system gnu-build-system) (arguments - `(#:configure-flags - (list "--disable-debug" - "--sysconfdir=/etc") - #:phases - (modify-phases %standard-phases - (replace 'install - (lambda* (#:key make-flags outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (conf (string-append out "/etc/scanbd"))) - (apply invoke "make" "install" - ;; Install example configuration to the store, not /etc. - ;; These don't inherit from each other, so we need both. - (string-append "scanbdconfdir=" conf) - (string-append "scannerconfdir=" conf "/scanner.d") - make-flags)))) - (add-after 'install 'install-extra-documentation - ;; The README provides more detailed set-up instructions than the - ;; man page. - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (doc (string-append out "/share/doc/" - ,name "-" ,version))) - (install-file "doc/README.txt" doc))))))) + (list #:configure-flags + #~(list "--disable-debug" + "--sysconfdir=/etc" + "CFLAGS=-Wno-error") ; warnings should never be fatal + #:phases + #~(modify-phases %standard-phases + (replace 'install + (lambda* (#:key make-flags #:allow-other-keys) + (let ((conf (string-append #$output "/etc/scanbd"))) + (apply invoke "make" "install" + ;; Install example configuration to the store, not + ;; /etc. These don't inherit from each other, so + ;; we need both. + (string-append "scanbdconfdir=" conf) + (string-append "scannerconfdir=" conf "/scanner.d") + make-flags)))) + (add-after 'install 'install-extra-documentation + ;; The README provides more detailed set-up instructions than + ;; the man page. + (lambda _ + (let ((doc (string-append #$output "/share/doc/" + #$name "-" #$version))) + (install-file "doc/README.txt" doc))))))) (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (inputs `(("dbus" ,dbus) ("libconfuse" ,libconfuse) @@ -240,7 +296,7 @@ package contains the library and drivers."))) ("zlib" ,zlib))) (home-page "https://scanbd.sourceforge.io") (synopsis "Configurable scanner button monitor") - (description "Scanbd stands for scanner button daemon. It regulary polls + (description "Scanbd stands for scanner button daemon. It regularly polls scanners for pressed buttons, function knob changes, or other events such as (un)plugging the scanner or inserting and removing paper. Then it performs the desired action(s) such as saving, copying, or e-mailing the image. @@ -315,7 +371,7 @@ provided the driver also exposes the buttons.") (rmdir (string-append out "/sbin")) #t)))))) (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (inputs `(("gtk+" ,gtk+-2) ("lcms" ,lcms) |