~ruther/guix-local

dfe010d84ba8a8c5947f3c0f3e6011945cad789d — Sergey Trofimov 9 months ago 9446d8b
gnu: sane-backends: Remove hplip dependency.

* gnu/packages/scanner.scm (sane-backends)[inputs]: Omit hplip.
[arguments]: Remove hplip phases.
* gnu/services/desktop.scm (lift-sane-configuration): Warn user that
hplip needs to be explicitly enabled in sane-configuration.

Change-Id: I05ffc3a2d04c5ee3da2739b68085557ff791814f
2 files changed, 7 insertions(+), 22 deletions(-)

M gnu/packages/scanner.scm
M gnu/services/desktop.scm
M gnu/packages/scanner.scm => gnu/packages/scanner.scm +1 -21
@@ 224,15 224,11 @@ hand-held scanner, video- and still-cameras, frame-grabbers, etc.).  The
package contains the library, but no drivers.")
    (license license: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 the SANE
;; project, and builds all of those backends.
(define-public sane-backends
  (package/inherit sane
    (name "sane-backends")
    (inputs
     `(("hplip" ,(@ (gnu packages cups) hplip))
       ("libjpeg" ,libjpeg-turbo)       ; for pixma/epsonds/other back ends
     `(("libjpeg" ,libjpeg-turbo)       ; for pixma/epsonds/other back ends
       ("libpng" ,libpng)               ; support ‘scanimage --format=png’
       ("libxml2" ,libxml2)             ; for pixma back end
       ,@(package-inputs sane)))


@@ 247,22 243,6 @@ package contains the library, but no drivers.")
               ;;   <https://bugs.gnu.org/39449>
               (substitute* "testsuite/backend/genesys/Makefile.in"
                 ((" genesys_unit_tests\\$\\(EXEEXT\\)") ""))
               #t))
           (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")

M gnu/services/desktop.scm => gnu/services/desktop.scm +6 -1
@@ 1712,7 1712,12 @@ accountsservice web site} for more information."
      config
      (begin
        (when warn?
          (warning (G_ "'sane' service now expects a 'sane-configuration' record~%")))
          (warning (G_ "'sane' service now expects a 'sane-configuration' record~%"))

          (when (eq? config sane-backends)
            (warning (G_ "'sane-backends' does not include 'hplip' backend anymore. Add it
explicitly when needed.~%"))))

        (sane-configuration (backends (list config))))))

(define sane-service-type