From 3b71b36c08cbcc90efccb7e449ecdcd19ab02991 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 6 Aug 2015 12:23:26 +0200 Subject: 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 --- gnu/packages/scanner.scm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'gnu') 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 +;;; Copyright © 2014 John Darrington +;;; Copyright © 2015 Andy Wingo ;;; ;;; 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: ;; -- cgit v1.2.3