gnu: sane-backends-minimal: Fix USB support.
* gnu/packages/scanner.scm (sane-backends-minimal)[inputs]: Replace libusb-compat with libusb. [arguments]: Disable tests that require USB access.
This commit is contained in:
		
							parent
							
								
									d40ec4a0d0
								
							
						
					
					
						commit
						abe6e670d3
					
				
					 1 changed files with 17 additions and 9 deletions
				
			
		| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
 | 
					;;; Copyright © 2014 John Darrington <jmd@gnu.org>
 | 
				
			||||||
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
 | 
					;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
 | 
				
			||||||
;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 | 
					;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 | 
				
			||||||
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 | 
					;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 | 
				
			||||||
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
 | 
					;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
| 
						 | 
					@ -55,7 +55,7 @@
 | 
				
			||||||
    (native-inputs
 | 
					    (native-inputs
 | 
				
			||||||
     `(("pkg-config" ,pkg-config)))
 | 
					     `(("pkg-config" ,pkg-config)))
 | 
				
			||||||
    (inputs
 | 
					    (inputs
 | 
				
			||||||
     `(("libusb-compat" ,libusb-compat)))
 | 
					     `(("libusb" ,libusb)))
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     `(#:phases
 | 
					     `(#:phases
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
| 
						 | 
					@ -63,19 +63,27 @@
 | 
				
			||||||
           (lambda _
 | 
					           (lambda _
 | 
				
			||||||
             (setenv "BACKENDS" " ")
 | 
					             (setenv "BACKENDS" " ")
 | 
				
			||||||
             #t))
 | 
					             #t))
 | 
				
			||||||
 | 
					         (add-after 'unpack 'disable-failing-tests
 | 
				
			||||||
 | 
					           (lambda _
 | 
				
			||||||
             ;; Disable unmaintained tests that that fail with errors resembling:
 | 
					             ;; Disable unmaintained tests that that fail with errors resembling:
 | 
				
			||||||
             ;;
 | 
					             ;;
 | 
				
			||||||
             ;; < # by sane-desc 3.5 from sane-backends 1.0.24git on Jul 31 2013
 | 
					             ;; < # by sane-desc 3.5 from sane-backends 1.0.24git on Jul 31 2013
 | 
				
			||||||
             ;; ---
 | 
					             ;; ---
 | 
				
			||||||
             ;; > # by sane-desc 3.5 from sane-backends 1.0.27 on 1970-01-01#
 | 
					             ;; > # by sane-desc 3.5 from sane-backends 1.0.27 on 1970-01-01#
 | 
				
			||||||
             ;; FAIL: sane-desc -m usermap -s ./data
 | 
					             ;; FAIL: sane-desc -m usermap -s ./data
 | 
				
			||||||
         (add-before 'configure 'disable-failing-tests
 | 
					 | 
				
			||||||
           (lambda _
 | 
					 | 
				
			||||||
             (for-each
 | 
					             (for-each
 | 
				
			||||||
              (lambda (pattern)
 | 
					              (lambda (pattern)
 | 
				
			||||||
                (substitute* "testsuite/tools/Makefile.in"
 | 
					                (substitute* "testsuite/tools/Makefile.in"
 | 
				
			||||||
                  (((string-append " " pattern " ")) " ")))
 | 
					                  (((string-append " " pattern " ")) " ")))
 | 
				
			||||||
              (list "usermap" "db" "udev" "udev\\+acl" "udev\\+hwdb" "hwdb"))
 | 
					              (list "usermap" "db" "udev" "udev\\+acl" "udev\\+hwdb" "hwdb"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					             ;; Disable tests that try to connect to actual USB hardware & fail
 | 
				
			||||||
 | 
					             ;; with the following error when no USB access is allowed at all:
 | 
				
			||||||
 | 
					             ;;
 | 
				
			||||||
 | 
					             ;; sanei_usb_test: sanei_usb_test.c:849: main: Assertion
 | 
				
			||||||
 | 
					             ;; `test_init (1)' failed.
 | 
				
			||||||
 | 
					             (substitute* "testsuite/sanei/Makefile.in"
 | 
				
			||||||
 | 
					               (("sanei_usb_test\\$\\(EXEEXT\\) ") ""))
 | 
				
			||||||
             #t))
 | 
					             #t))
 | 
				
			||||||
         (add-after 'install 'install-udev-rules
 | 
					         (add-after 'install 'install-udev-rules
 | 
				
			||||||
           (lambda* (#:key outputs #:allow-other-keys)
 | 
					           (lambda* (#:key outputs #:allow-other-keys)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue