GNU bug report logs -
#25101
simple-scan can't use hpaio
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25101 in the body.
You can then email your comments to 25101 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Sat, 03 Dec 2016 18:42:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sat, 03 Dec 2016 18:42:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Sun, 04 Dec 2016 04:02:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 25101 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Sun, 04 Dec 2016 04:02:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 25101 <at> debbugs.gnu.org (full text, mbox):
* 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 <at> gnu.org>
;;; Copyright © 2015 Andy Wingo <wingo <at> igalia.com>
+;;; Copyright © 2016 Andy Patterson <ajpatter <at> 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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Sun, 04 Dec 2016 04:02:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 25101 <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Sun, 04 Dec 2016 04:19:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 25101 <at> debbugs.gnu.org (full text, mbox):
On Sat, 3 Dec 2016 23:00:35 -0500
Andy Patterson <ajpatter <at> 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".
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Mon, 05 Dec 2016 20:49:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 25101 <at> debbugs.gnu.org (full text, mbox):
Andy Patterson <ajpatter <at> 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’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Mon, 05 Dec 2016 22:39:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 25101 <at> debbugs.gnu.org (full text, mbox):
On Mon, 05 Dec 2016 21:48:36 +0100
ludo <at> 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 <at> 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 <at> gnu.org>
;;; Copyright © 2015 Andy Wingo <wingo <at> igalia.com>
+;;; Copyright © 2016 Andy Patterson <ajpatter <at> 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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Tue, 06 Dec 2016 09:12:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 25101 <at> debbugs.gnu.org (full text, mbox):
Andy Patterson <ajpatter <at> uwaterloo.ca> skribis:
> On Mon, 05 Dec 2016 21:48:36 +0100
> ludo <at> 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’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Mon, 12 Dec 2016 20:12:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 25101 <at> debbugs.gnu.org (full text, mbox):
Hi, and sorry for the late reply.
On Tue, 06 Dec 2016 10:10:57 +0100
ludo <at> gnu.org (Ludovic Courtès) wrote:
> Andy Patterson <ajpatter <at> uwaterloo.ca> skribis:
>
> > On Mon, 05 Dec 2016 21:48:36 +0100
> > ludo <at> 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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Mon, 12 Dec 2016 22:42:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 25101 <at> debbugs.gnu.org (full text, mbox):
Andy Patterson <ajpatter <at> uwaterloo.ca> skribis:
> Hi, and sorry for the late reply.
>
> On Tue, 06 Dec 2016 10:10:57 +0100
> ludo <at> gnu.org (Ludovic Courtès) wrote:
>
>> Andy Patterson <ajpatter <at> uwaterloo.ca> skribis:
>>
>> > On Mon, 05 Dec 2016 21:48:36 +0100
>> > ludo <at> 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’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Wed, 14 Dec 2016 05:04:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 25101 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Wed, 14 Dec 2016 05:05:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 25101 <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Wed, 14 Dec 2016 05:05:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 25101 <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
bug-guix <at> gnu.org
:
bug#25101
; Package
guix
.
(Wed, 14 Dec 2016 05:05:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 25101 <at> debbugs.gnu.org (full text, mbox):
* 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 <at> gnu.org>
;;; Copyright © 2015 Andy Wingo <wingo <at> igalia.com>
+;;; Copyright © 2016 Andy Patterson <ajpatter <at> 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
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Sat, 17 Dec 2016 22:13:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
bug acknowledged by developer.
(Sat, 17 Dec 2016 22:13:02 GMT)
Full text and
rfc822 format available.
Message #49 received at 25101-done <at> debbugs.gnu.org (full text, mbox):
Hello!
Andy Patterson <ajpatter <at> 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’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 15 Jan 2017 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 157 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.