From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: [PATCH] gnu: sane-backends: Support USB scanners. Date: Thu, 06 Aug 2015 12:28:52 +0200 Message-ID: <87io8slnh7.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNIQc-0007Cd-8E for guix-devel@gnu.org; Thu, 06 Aug 2015 06:29:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNIQY-0005DV-8S for guix-devel@gnu.org; Thu, 06 Aug 2015 06:29:38 -0400 Received: from pb-sasl1.int.icgroup.com ([208.72.237.25]:64901 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNIQY-00052b-4E for guix-devel@gnu.org; Thu, 06 Aug 2015 06:29:34 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id B82D95C68D for ; Thu, 6 Aug 2015 06:28:57 -0400 (EDT) Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id AF24D5C68C for ; Thu, 6 Aug 2015 06:28:57 -0400 (EDT) Received: from rusty (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id E1C305C68B for ; Thu, 6 Aug 2015 06:28:56 -0400 (EDT) Content-Disposition: inline; filename=0001-gnu-sane-backends-Support-USB-scanners.patch List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org >From eeff701d60de09445abbfca23602abed27e648b9 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 6 Aug 2015 12:23:26 +0200 Subject: [PATCH 1/4] 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. --- gnu/packages/scanner.scm | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 84d1dee..8bafed3 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, 2015 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,24 @@ (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 '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: ;; @@ -55,4 +74,3 @@ 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 - -- 2.4.3