aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2015-08-06 12:23:26 +0200
committerMark H Weaver <mhw@netris.org>2015-08-08 14:09:56 -0400
commit3b71b36c08cbcc90efccb7e449ecdcd19ab02991 (patch)
treea2f3dcc3d888cbe03d4d1c49ca2a108fd0c27049 /gnu
parente0477b73912d7c25acf1983ed6fc7ecc5234c038 (diff)
downloadguix-3b71b36c08cbcc90efccb7e449ecdcd19ab02991.tar.gz
guix-3b71b36c08cbcc90efccb7e449ecdcd19ab02991.zip
gnu: sane-backends: Support USB scanners.
* gnu/packages/scanner.scm (sane-backends): Build with libusb-compat as an input and install a udev rule to give users access to scanners. Modified-By: Mark H Weaver <mhw@netris.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/scanner.scm22
1 files changed, 20 insertions, 2 deletions
diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index 84d1deeb62..76e11a9516 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright 2014 John Darrington <jmd@gnu.org>
+;;; Copyright © 2014 John Darrington <jmd@gnu.org>
+;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,6 +21,8 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages libusb)
#:use-module ((guix licenses)
#:prefix licence:))
@@ -36,8 +39,23 @@
(base32
"0ba68m6bzni54axjk15i51rya7hfsdliwvqyan5msl7iaid0iir7"))))
(build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libusb-compat" ,libusb-compat)))
(arguments
- `(#:tests? #f))
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after
+ 'install 'install-udev-rules
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out "/lib/udev/rules.d"))
+ (copy-file "tools/udev/libsane.rules"
+ (string-append out
+ "/lib/udev/rules.d/"
+ "60-libsane.rules"))))))))
;; It would seem that tests are not maintained - fails with
;; the following:
;;