* bug#25101: simple-scan can't use hpaio @ 2016-12-03 18:41 Danny Milosavljevic 2016-12-04 4:00 ` Andy Patterson 0 siblings, 1 reply; 15+ messages in thread From: Danny Milosavljevic @ 2016-12-03 18:41 UTC (permalink / raw) To: 25101 simple-scan can't use hpaio as scanner. That means that HP scanners don't work at all. That's because: (1) sane-backends installs a hard-coded dll.conf . In itself, that's not so bad. However, this file doesn't contain a line "hpaio". To workaround this, I set environment variable SANE_CONFIG_DIR to point to a directory which contains a dll.conf which contains (only) a line "hpaio". (2) sane-backends tries to load /gnu/store/f4kmkdf8s0kpwia9wgiw5a35xljh4a77-sane-backends-1.0.25/lib/sane/libsane-hpaio.so.1 - which won't work. I checked the source code of sane-backends - and it searches many locations for loadable dynamic libraries, for example the ones specified in environment variables LD_LIBRARY_PATH, SHLIB_PATH LIBPATH (see backend/dll.c load()). (3) dll.conf has no support for absolute paths. Whatever you put there it will just blindly put after a hard-coded directory prefix. This is on GuixSD. How to proceed? Add support for absolute paths and a service which merges multiple dll.conf into one file ? Or just add hplip as a hard dependency of sane-backends and make it link libsane-hpaio (that's possible in sane)? Also, should we also amend simple-scan to propagate-input hplip? Otherwise it will come up with a "Install Driver" dialog which won't work either. ^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#25101: simple-scan can't use hpaio 2016-12-03 18:41 bug#25101: simple-scan can't use hpaio Danny Milosavljevic @ 2016-12-04 4:00 ` Andy Patterson 2016-12-04 4:00 ` bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant Andy Patterson ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Andy Patterson @ 2016-12-04 4:00 UTC (permalink / raw) To: 25101 Hi Danny, I also noticed this problem a couple days ago, and I really needed to scan something, so I've had these patches in my tree. It basically implements your second suggestion. I think it's the right way to go about it. I realise you might also have patches you're working on, but maybe this is helpful anyway. Suggestions welcome, especially concerning how I handled the recursive module dependencies. Thanks, -- Andy ^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. 2016-12-04 4:00 ` Andy Patterson @ 2016-12-04 4:00 ` Andy Patterson 2016-12-05 20:48 ` Ludovic Courtès 2016-12-04 4:00 ` bug#25101: [PATCH 2/2] gnu: simple-scan: Enable hpaio support Andy Patterson 2016-12-04 4:18 ` bug#25101: simple-scan can't use hpaio Andy Patterson 2 siblings, 1 reply; 15+ messages in thread From: Andy Patterson @ 2016-12-04 4:00 UTC (permalink / raw) To: 25101 * gnu/packages/scanner.scm (sane-backends+hpaio): New variable. --- gnu/packages/scanner.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 76817b3..f918291 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> +;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu packages scanner) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages pkg-config) #:use-module (gnu packages libusb) @@ -73,3 +75,31 @@ proving access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The package contains the library and drivers.") (license licence:gpl2+))) ; plus linking exception + +(define-public sane-backends+hpaio + (package + (inherit sane-backends) + (name "sane-backends+hpaio") + (inputs + `(("hplip" ,(@ (gnu packages cups) hplip)) + ,@(package-inputs sane-backends))) + (arguments + (substitute-keyword-arguments (package-arguments sane-backends) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'add-backends + (lambda _ + (substitute* "backend/dll.conf.in" + (("hp5590" all) (format #f "~a~%~a" all "hpaio"))) + #t)) + (add-after 'install 'install-hpaio + (lambda* (#:key inputs outputs #:allow-other-keys) + (define hplip (string-append (assoc-ref inputs "hplip") + "/lib/sane")) + (define out (string-append (assoc-ref outputs "out") + "/lib/sane")) + (for-each + (lambda (file) + (symlink file (string-append out "/" (basename file)))) + (find-files hplip)) + #t)))))))) -- 2.10.2 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. 2016-12-04 4:00 ` bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant Andy Patterson @ 2016-12-05 20:48 ` Ludovic Courtès 2016-12-05 22:38 ` Andy Patterson 0 siblings, 1 reply; 15+ messages in thread From: Ludovic Courtès @ 2016-12-05 20:48 UTC (permalink / raw) To: Andy Patterson; +Cc: 25101 Andy Patterson <ajpatter@uwaterloo.ca> skribis: > * gnu/packages/scanner.scm (sane-backends+hpaio): New variable. [...] > +(define-public sane-backends+hpaio Could you add a comment and a synopsis explaining what’s this is? > + (package > + (inherit sane-backends) > + (name "sane-backends+hpaio") > + (inputs > + `(("hplip" ,(@ (gnu packages cups) hplip)) > + ,@(package-inputs sane-backends))) The closure size of this is 290 MiB whereas it’s 87 MiB for ‘sane-backends’. I suppose that’s the reason to keep’em separated? Otherwise LGTM, thanks! Ludo’. ^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. 2016-12-05 20:48 ` Ludovic Courtès @ 2016-12-05 22:38 ` Andy Patterson 2016-12-06 9:10 ` Ludovic Courtès 0 siblings, 1 reply; 15+ messages in thread From: Andy Patterson @ 2016-12-05 22:38 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 25101 On Mon, 05 Dec 2016 21:48:36 +0100 ludo@gnu.org (Ludovic Courtès) wrote: > > +(define-public sane-backends+hpaio > > Could you add a comment and a synopsis explaining what’s this is? > Sure, is the following patch ok? > > + (package > > + (inherit sane-backends) > > + (name "sane-backends+hpaio") > > + (inputs > > + `(("hplip" ,(@ (gnu packages cups) hplip)) > > + ,@(package-inputs sane-backends))) > > The closure size of this is 290 MiB whereas it’s 87 MiB for > ‘sane-backends’. I suppose that’s the reason to keep’em separated? > Yeah, and there's also the fact that hplip depends on sane-backends. But this is the reason I didn't change sane-backends into a private variable, and then make this the new sane-backends. > Otherwise LGTM, thanks! > > Ludo’. Thanks for your review. -- Andy From 05474fbe68591b136c912db8aa1400b24800c541 Mon Sep 17 00:00:00 2001 From: Andy Patterson <ajpatter@uwaterloo.ca> Date: Sat, 3 Dec 2016 22:29:44 -0500 Subject: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. * gnu/packages/scanner.scm (sane-backends+hpaio): New variable. --- gnu/packages/scanner.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 76817b3..f74c4e1 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> +;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu packages scanner) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages pkg-config) #:use-module (gnu packages libusb) @@ -73,3 +75,36 @@ proving access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The package contains the library and drivers.") (license licence:gpl2+))) ; plus linking exception + +;; This variant links in the hpaio backend, provided by hplip, which adds +;; support for HP scanners whose backends are not maintained by +;; 'sane-backends' +(define-public sane-backends+hpaio + (package + (inherit sane-backends) + (name "sane-backends+hpaio") + (inputs + `(("hplip" ,(@ (gnu packages cups) hplip)) + ,@(package-inputs sane-backends))) + (arguments + (substitute-keyword-arguments (package-arguments sane-backends) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'add-backends + (lambda _ + (substitute* "backend/dll.conf.in" + (("hp5590" all) (format #f "~a~%~a" all "hpaio"))) + #t)) + (add-after 'install 'install-hpaio + (lambda* (#:key inputs outputs #:allow-other-keys) + (define hplip (string-append (assoc-ref inputs "hplip") + "/lib/sane")) + (define out (string-append (assoc-ref outputs "out") + "/lib/sane")) + (for-each + (lambda (file) + (symlink file (string-append out "/" (basename file)))) + (find-files hplip)) + #t)))))) + (synopsis + "Raster image scanner library and drivers, with full HP scanner support"))) -- 2.10.2 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. 2016-12-05 22:38 ` Andy Patterson @ 2016-12-06 9:10 ` Ludovic Courtès 2016-12-12 20:11 ` Andy Patterson 0 siblings, 1 reply; 15+ messages in thread From: Ludovic Courtès @ 2016-12-06 9:10 UTC (permalink / raw) To: Andy Patterson; +Cc: 25101 Andy Patterson <ajpatter@uwaterloo.ca> skribis: > On Mon, 05 Dec 2016 21:48:36 +0100 > ludo@gnu.org (Ludovic Courtès) wrote: > >> > +(define-public sane-backends+hpaio >> >> Could you add a comment and a synopsis explaining what’s this is? >> > > Sure, is the following patch ok? Yup! >> > + (package >> > + (inherit sane-backends) >> > + (name "sane-backends+hpaio") >> > + (inputs >> > + `(("hplip" ,(@ (gnu packages cups) hplip)) >> > + ,@(package-inputs sane-backends))) >> >> The closure size of this is 290 MiB whereas it’s 87 MiB for >> ‘sane-backends’. I suppose that’s the reason to keep’em separated? >> > > Yeah, and there's also the fact that hplip depends on sane-backends. > But this is the reason I didn't change sane-backends into a private > variable, and then make this the new sane-backends. Oh right. One last thing: should we renaming “sane-backends” to “sane-backends-minimal”, and “sane-backends+hpaio” to “sane-backends”? That way all scanners would work out of the box, at the expense of extra disk usage, but that is roughly what patch 2/2 does anyway. Thanks! Ludo’. ^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. 2016-12-06 9:10 ` Ludovic Courtès @ 2016-12-12 20:11 ` Andy Patterson 2016-12-12 22:41 ` Ludovic Courtès 0 siblings, 1 reply; 15+ messages in thread From: Andy Patterson @ 2016-12-12 20:11 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 25101 Hi, and sorry for the late reply. On Tue, 06 Dec 2016 10:10:57 +0100 ludo@gnu.org (Ludovic Courtès) wrote: > Andy Patterson <ajpatter@uwaterloo.ca> skribis: > > > On Mon, 05 Dec 2016 21:48:36 +0100 > > ludo@gnu.org (Ludovic Courtès) wrote: > > > >> > +(define-public sane-backends+hpaio > >> > >> Could you add a comment and a synopsis explaining what’s this is? > >> > > > > Sure, is the following patch ok? > > Yup! > > >> > + (package > >> > + (inherit sane-backends) > >> > + (name "sane-backends+hpaio") > >> > + (inputs > >> > + `(("hplip" ,(@ (gnu packages cups) hplip)) > >> > + ,@(package-inputs sane-backends))) > >> > >> The closure size of this is 290 MiB whereas it’s 87 MiB for > >> ‘sane-backends’. I suppose that’s the reason to keep’em separated? > >> > > > > Yeah, and there's also the fact that hplip depends on sane-backends. > > But this is the reason I didn't change sane-backends into a private > > variable, and then make this the new sane-backends. > > Oh right. > > One last thing: should we renaming “sane-backends” to > “sane-backends-minimal”, and “sane-backends+hpaio” to “sane-backends”? The current "sane-backends" isn't really minimal, as it includes most backends. I'm not sure how it's applied elsewhere in Guix though, so I'll leave it up to you. > > That way all scanners would work out of the box, at the expense of > extra disk usage, but that is roughly what patch 2/2 does anyway. One more patch is required in either case, as hplip would need to use sane-backends-minimal. Let me know if you'd like me to make this change. -- Andy ^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. 2016-12-12 20:11 ` Andy Patterson @ 2016-12-12 22:41 ` Ludovic Courtès 2016-12-14 5:03 ` Andy Patterson 0 siblings, 1 reply; 15+ messages in thread From: Ludovic Courtès @ 2016-12-12 22:41 UTC (permalink / raw) To: Andy Patterson; +Cc: 25101 Andy Patterson <ajpatter@uwaterloo.ca> skribis: > Hi, and sorry for the late reply. > > On Tue, 06 Dec 2016 10:10:57 +0100 > ludo@gnu.org (Ludovic Courtès) wrote: > >> Andy Patterson <ajpatter@uwaterloo.ca> skribis: >> >> > On Mon, 05 Dec 2016 21:48:36 +0100 >> > ludo@gnu.org (Ludovic Courtès) wrote: >> > >> >> > +(define-public sane-backends+hpaio >> >> >> >> Could you add a comment and a synopsis explaining what’s this is? >> >> >> > >> > Sure, is the following patch ok? >> >> Yup! >> >> >> > + (package >> >> > + (inherit sane-backends) >> >> > + (name "sane-backends+hpaio") >> >> > + (inputs >> >> > + `(("hplip" ,(@ (gnu packages cups) hplip)) >> >> > + ,@(package-inputs sane-backends))) >> >> >> >> The closure size of this is 290 MiB whereas it’s 87 MiB for >> >> ‘sane-backends’. I suppose that’s the reason to keep’em separated? >> >> >> > >> > Yeah, and there's also the fact that hplip depends on sane-backends. >> > But this is the reason I didn't change sane-backends into a private >> > variable, and then make this the new sane-backends. >> >> Oh right. >> >> One last thing: should we renaming “sane-backends” to >> “sane-backends-minimal”, and “sane-backends+hpaio” to “sane-backends”? > > The current "sane-backends" isn't really minimal, as it includes most > backends. I'm not sure how it's applied elsewhere in Guix though, so > I'll leave it up to you. Right. Well maybe while you’re at it you could make the new ‘sane-backend-minimal’ more minimal, it would make sense to me. >> That way all scanners would work out of the box, at the expense of >> extra disk usage, but that is roughly what patch 2/2 does anyway. > > One more patch is required in either case, as hplip would need to use > sane-backends-minimal. Let me know if you'd like me to make this change. Yes please! Thank you! Ludo’. ^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. 2016-12-12 22:41 ` Ludovic Courtès @ 2016-12-14 5:03 ` Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 1/3] gnu: sane-backends: Disable backend generation Andy Patterson ` (3 more replies) 0 siblings, 4 replies; 15+ messages in thread From: Andy Patterson @ 2016-12-14 5:03 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 25101 Hi, Here's some patches implementing what you've suggested. I decided to use the full "sane-backends" for the other dependents, since I guessed that they need some backend support. If anyone knows that that's not required, it can be changed. Thanks, -- Andy ^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/3] gnu: sane-backends: Disable backend generation. 2016-12-14 5:03 ` Andy Patterson @ 2016-12-14 5:03 ` Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 2/3] gnu: Add and use sane-backends-minimal Andy Patterson ` (2 subsequent siblings) 3 siblings, 0 replies; 15+ messages in thread From: Andy Patterson @ 2016-12-14 5:03 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 25101 * gnu/packages/scanner.scm (sane-backends)[arguments]: Add a phase to disable the compilation of backends. --- gnu/packages/scanner.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 76817b389..01db5ee21 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -47,6 +47,10 @@ `(#:tests? #f #:phases (modify-phases %standard-phases + (add-before 'configure 'disable-backends + (lambda _ + (setenv "BACKENDS" " ") + #t)) (add-after 'install 'install-udev-rules (lambda* (#:key outputs #:allow-other-keys) -- 2.11.0 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 2/3] gnu: Add and use sane-backends-minimal. 2016-12-14 5:03 ` Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 1/3] gnu: sane-backends: Disable backend generation Andy Patterson @ 2016-12-14 5:03 ` Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 3/3] gnu: Add and use sane-backends Andy Patterson 2016-12-17 22:12 ` bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant Ludovic Courtès 3 siblings, 0 replies; 15+ messages in thread From: Andy Patterson @ 2016-12-14 5:03 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 25101 * gnu/packages/scanner.scm (sane-backends): Rename to... (sane-backends-minimal): this. Adjust name, source, synopsis and description accordingly. * gnu/packages/cups.scm (hplip): Use 'sane-backends-minimal' instead of 'sane-backends'. * gnu/packages/gnome.scm (colord, simple-scan): Likewise. * gnu/packages/libreoffice.scm (libreoffice): Likewise. * gnu/packages/wine.scm (wine): Likewise. --- gnu/packages/cups.scm | 2 +- gnu/packages/gnome.scm | 4 ++-- gnu/packages/libreoffice.scm | 2 +- gnu/packages/scanner.scm | 11 ++++++----- gnu/packages/wine.scm | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 0a8a10ecb..baa77f7aa 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -416,7 +416,7 @@ device-specific programs to convert and print many types of files.") (inputs `(("libjpeg" ,libjpeg) ("cups-minimal" ,cups-minimal) ("libusb" ,libusb) - ("sane-backends" ,sane-backends) + ("sane-backends" ,sane-backends-minimal) ("dbus" ,dbus) ("python-wrapper" ,python-wrapper) ("python" ,python) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 1762381cf..7ffe0bc2d 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2433,7 +2433,7 @@ keyboard shortcuts.") ("libusb" ,libusb) ("sqlite" ,sqlite) ("polkit" ,polkit) - ("sane-backends" ,sane-backends))) + ("sane-backends" ,sane-backends-minimal))) (home-page "http://www.freedesktop.org/software/colord/") (synopsis "Color management service") (description "Colord is a system service that makes it easy to manage, @@ -3571,7 +3571,7 @@ USB transfers with your high-level application or system daemon.") ("cairo" ,cairo) ("gdk-pixbuf" ,gdk-pixbuf) ("gusb" ,gusb) - ("libsane" ,sane-backends))) + ("libsane" ,sane-backends-minimal))) (native-inputs `(("gettext" ,gettext-minimal) ("itstool" ,itstool) diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 279e8e2d2..307a54496 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -784,7 +784,7 @@ and to return information on pronunciations, meanings and synonyms.") ("postgresql" ,postgresql) ("python" ,python) ("redland" ,redland) - ("sane-backends" ,sane-backends) + ("sane-backends" ,sane-backends-minimal) ("unixodbc" ,unixodbc) ("unzip" ,unzip) ("vigra" ,vigra) diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 01db5ee21..e913858f5 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -26,15 +26,15 @@ #:use-module ((guix licenses) #:prefix licence:)) -(define-public sane-backends +(define-public sane-backends-minimal (package - (name "sane-backends") + (name "sane-backends-minimal") (version "1.0.25") (source (origin (method url-fetch) (uri (string-append "https://alioth.debian.org/frs/download.php/file/4146/" - name "-" version ".tar.gz")) + "sane-backends-" version ".tar.gz")) (sha256 (base32 "0b3fvhrxl4l82bf3v0j47ypjv6a0k5lqbgknrq1agpmjca6vmmx4")))) @@ -71,9 +71,10 @@ ;; **** File generated for html-backends-split mode is different from reference ;; Makefile:501: recipe for target 'check.local' failed (home-page "http://www.sane-project.org") - (synopsis "Raster image scanner library and drivers") + (synopsis + "Raster image scanner library and drivers, without scanner support") (description "SANE stands for \"Scanner Access Now Easy\" and is an API proving access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The -package contains the library and drivers.") +package contains the library, but no drivers.") (license licence:gpl2+))) ; plus linking exception diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index 367f27af5..83b6297f0 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -83,7 +83,7 @@ ("libmpg123" ,mpg123) ("libldap" ,openldap) ("libnetapi" ,samba) - ("libsane" ,sane-backends) + ("libsane" ,sane-backends-minimal) ("libpng" ,libpng) ("libjpeg" ,libjpeg) ("libtiff" ,libtiff) -- 2.11.0 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 3/3] gnu: Add and use sane-backends. 2016-12-14 5:03 ` Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 1/3] gnu: sane-backends: Disable backend generation Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 2/3] gnu: Add and use sane-backends-minimal Andy Patterson @ 2016-12-14 5:03 ` Andy Patterson 2016-12-17 22:12 ` bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant Ludovic Courtès 3 siblings, 0 replies; 15+ messages in thread From: Andy Patterson @ 2016-12-14 5:03 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 25101 * gnu/packages/scanner.scm (sane-backends): New variable. * gnu/packages/gnome.scm (colord, simple-scan): Use it instead of 'sane-backends-minimal'. * gnu/packages/libreoffice.scm (libreoffice): Likewise. * gnu/packages/wine.scm (wine): Likewise. --- gnu/packages/gnome.scm | 4 ++-- gnu/packages/libreoffice.scm | 2 +- gnu/packages/scanner.scm | 40 ++++++++++++++++++++++++++++++++++++++++ gnu/packages/wine.scm | 2 +- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 7ffe0bc2d..1762381cf 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2433,7 +2433,7 @@ keyboard shortcuts.") ("libusb" ,libusb) ("sqlite" ,sqlite) ("polkit" ,polkit) - ("sane-backends" ,sane-backends-minimal))) + ("sane-backends" ,sane-backends))) (home-page "http://www.freedesktop.org/software/colord/") (synopsis "Color management service") (description "Colord is a system service that makes it easy to manage, @@ -3571,7 +3571,7 @@ USB transfers with your high-level application or system daemon.") ("cairo" ,cairo) ("gdk-pixbuf" ,gdk-pixbuf) ("gusb" ,gusb) - ("libsane" ,sane-backends-minimal))) + ("libsane" ,sane-backends))) (native-inputs `(("gettext" ,gettext-minimal) ("itstool" ,itstool) diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 307a54496..279e8e2d2 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -784,7 +784,7 @@ and to return information on pronunciations, meanings and synonyms.") ("postgresql" ,postgresql) ("python" ,python) ("redland" ,redland) - ("sane-backends" ,sane-backends-minimal) + ("sane-backends" ,sane-backends) ("unixodbc" ,unixodbc) ("unzip" ,unzip) ("vigra" ,vigra) diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index e913858f5..fdad1c445 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> +;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu packages scanner) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages pkg-config) #:use-module (gnu packages libusb) @@ -78,3 +80,41 @@ proving access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The package contains the library, but no drivers.") (license licence:gpl2+))) ; plus linking exception + +;; This variant links in the hpaio backend, provided by hplip, which adds +;; support for HP scanners whose backends are not maintained by +;; 'sane-backends'. It also builds all of those backends. +(define-public sane-backends + (package + (inherit sane-backends-minimal) + (name "sane-backends") + (inputs + `(("hplip" ,(@ (gnu packages cups) hplip)) + ,@(package-inputs sane-backends-minimal))) + (arguments + (substitute-keyword-arguments (package-arguments sane-backends-minimal) + ((#:phases phases) + `(modify-phases ,phases + (delete 'disable-backends) + (add-after 'unpack 'add-backends + (lambda _ + (substitute* "backend/dll.conf.in" + (("hp5590" all) (format #f "~a~%~a" all "hpaio"))) + #t)) + (add-after 'install 'install-hpaio + (lambda* (#:key inputs outputs #:allow-other-keys) + (define hplip (string-append (assoc-ref inputs "hplip") + "/lib/sane")) + (define out (string-append (assoc-ref outputs "out") + "/lib/sane")) + (for-each + (lambda (file) + (symlink file (string-append out "/" (basename file)))) + (find-files hplip)) + #t)))))) + (synopsis + "Raster image scanner library and drivers, with scanner support") + (description "SANE stands for \"Scanner Access Now Easy\" and is an API +proving access to any raster image scanner hardware (flatbed scanner, +hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The +package contains the library and drivers."))) diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index 83b6297f0..367f27af5 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -83,7 +83,7 @@ ("libmpg123" ,mpg123) ("libldap" ,openldap) ("libnetapi" ,samba) - ("libsane" ,sane-backends-minimal) + ("libsane" ,sane-backends) ("libpng" ,libpng) ("libjpeg" ,libjpeg) ("libtiff" ,libtiff) -- 2.11.0 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant. 2016-12-14 5:03 ` Andy Patterson ` (2 preceding siblings ...) 2016-12-14 5:03 ` bug#25101: [PATCH 3/3] gnu: Add and use sane-backends Andy Patterson @ 2016-12-17 22:12 ` Ludovic Courtès 3 siblings, 0 replies; 15+ messages in thread From: Ludovic Courtès @ 2016-12-17 22:12 UTC (permalink / raw) To: Andy Patterson; +Cc: 25101-done Hello! Andy Patterson <ajpatter@uwaterloo.ca> skribis: > Here's some patches implementing what you've suggested. I decided to use the > full "sane-backends" for the other dependents, since I guessed that they need > some backend support. If anyone knows that that's not required, it can be > changed. I think that’s fine. Applied all 3 patches. I also fixed a reproducibility issue due to timestamps in a subsequent commit. Thanks! Ludo’. ^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#25101: [PATCH 2/2] gnu: simple-scan: Enable hpaio support. 2016-12-04 4:00 ` Andy Patterson 2016-12-04 4:00 ` bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant Andy Patterson @ 2016-12-04 4:00 ` Andy Patterson 2016-12-04 4:18 ` bug#25101: simple-scan can't use hpaio Andy Patterson 2 siblings, 0 replies; 15+ messages in thread From: Andy Patterson @ 2016-12-04 4:00 UTC (permalink / raw) To: 25101 * gnu/packages/gnome.scm (simple-scan)[inputs]: Use 'sane-backends+hpaio'. --- gnu/packages/gnome.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 3aa0f56..531da43 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -3572,7 +3572,7 @@ USB transfers with your high-level application or system daemon.") ("cairo" ,cairo) ("gdk-pixbuf" ,gdk-pixbuf) ("gusb" ,gusb) - ("libsane" ,sane-backends))) + ("libsane" ,sane-backends+hpaio))) (native-inputs `(("gettext" ,gettext-minimal) ("itstool" ,itstool) -- 2.10.2 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* bug#25101: simple-scan can't use hpaio 2016-12-04 4:00 ` Andy Patterson 2016-12-04 4:00 ` bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant Andy Patterson 2016-12-04 4:00 ` bug#25101: [PATCH 2/2] gnu: simple-scan: Enable hpaio support Andy Patterson @ 2016-12-04 4:18 ` Andy Patterson 2 siblings, 0 replies; 15+ messages in thread From: Andy Patterson @ 2016-12-04 4:18 UTC (permalink / raw) To: 25101 On Sat, 3 Dec 2016 23:00:35 -0500 Andy Patterson <ajpatter@uwaterloo.ca> wrote: > Hi Danny, > > I also noticed this problem a couple days ago, and I really needed to > scan something, so I've had these patches in my tree. It basically > implements your second suggestion. I think it's the right way to go > about it. > > I realise you might also have patches you're working on, but maybe > this is helpful anyway. > > Suggestions welcome, especially concerning how I handled the > recursive module dependencies. > > Thanks, > > -- > Andy > Just adding Danny; didn't realise that a CC also needs to be added to the compose window for "git send-email". ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-12-17 22:13 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-12-03 18:41 bug#25101: simple-scan can't use hpaio Danny Milosavljevic 2016-12-04 4:00 ` Andy Patterson 2016-12-04 4:00 ` bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant Andy Patterson 2016-12-05 20:48 ` Ludovic Courtès 2016-12-05 22:38 ` Andy Patterson 2016-12-06 9:10 ` Ludovic Courtès 2016-12-12 20:11 ` Andy Patterson 2016-12-12 22:41 ` Ludovic Courtès 2016-12-14 5:03 ` Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 1/3] gnu: sane-backends: Disable backend generation Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 2/3] gnu: Add and use sane-backends-minimal Andy Patterson 2016-12-14 5:03 ` bug#25101: [PATCH 3/3] gnu: Add and use sane-backends Andy Patterson 2016-12-17 22:12 ` bug#25101: [PATCH 1/2] gnu: Add hpaio-enabled sane-backends variant Ludovic Courtès 2016-12-04 4:00 ` bug#25101: [PATCH 2/2] gnu: simple-scan: Enable hpaio support Andy Patterson 2016-12-04 4:18 ` bug#25101: simple-scan can't use hpaio Andy Patterson
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.