distro: attr: Fix references to /bin/sh.

* distro/packages/attr.scm (attr): Add `patch-makefile-SHELL'.  Patch
  `test/run' in `check' phase.
This commit is contained in:
Ludovic Courtès 2012-12-21 23:52:48 +01:00
parent c089511288
commit 380d5decfc

View file

@ -41,23 +41,34 @@ (define-public attr
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases `(#:phases
(alist-replace 'install (alist-cons-after
(lambda _ 'configure 'patch-makefile-SHELL
(zero? (system* "make" (lambda _
"install" (patch-makefile-SHELL "include/buildmacros"))
"install-lib" (alist-replace
"install-dev"))) 'install
(alist-replace 'check (lambda _
(lambda _ (zero? (system* "make"
(for-each patch-shebang "install"
(find-files "test" ".*")) "install-lib"
(system* "make" "tests" "-C" "test") "install-dev")))
(alist-replace
'check
(lambda _
;; Use the right shell.
(let ((bash (search-path (search-path-as-string->list
(getenv "PATH"))
"bash")))
(substitute* "test/run"
(("/bin/sh")
(string-append bash "/bin/bash"))))
;; XXX: Ignore the test result since (system* "make" "tests" "-C" "test")
;; this is dependent on the underlying
;; file system. ;; XXX: Ignore the test result since this is dependent on the
#t) ;; underlying file system.
%standard-phases)))) #t)
%standard-phases)))))
(inputs `(("perl" ,perl) (inputs `(("perl" ,perl)
("gettext" ,guix:gettext))) ("gettext" ,guix:gettext)))
(home-page (home-page