- (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:
- ;;
- ;; < This page was last updated on Wed Jul 31 07:52:48 2013
- ;; < by sane-desc 3.5 from sane-backends 1.0.24git
- ;; ---
- ;; > This page was last updated on Sun Oct 19 15:41:39 2014
- ;; > by sane-desc 3.5 from sane-backends 1.0.24
- ;; **** File generated for html-backends-split mode is different from reference
- ;; Makefile:501: recipe for target 'check.local' failed
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ ;; 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.27 on 1970-01-01#
+ ;; FAIL: sane-desc -m usermap -s ./data
+ (for-each
+ (lambda (pattern)
+ (substitute* "testsuite/tools/Makefile.in"
+ (((string-append " " pattern " ")) " ")))
+ (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))
+ (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"))
+ #t))))))