gnu: bash: Install headers in "include" output.
* gnu/packages/bash.scm (bash)[outputs]: New field. [arguments]: Use 'modify-phases'. Add 'install-headers' phase.master
parent
ce0614ddb0
commit
2b34b4b46d
|
@ -127,6 +127,26 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(with-directory-excursion (string-append out "/bin")
|
(with-directory-excursion (string-append out "/bin")
|
||||||
(symlink "bash" "sh")))))
|
(symlink "bash" "sh")))))
|
||||||
|
(install-headers-phase
|
||||||
|
'(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
;; Install Bash headers so that packages that provide extensions
|
||||||
|
;; can use them. We install them in include/bash; that's what
|
||||||
|
;; Debian does and what Bash extensions like recutils or
|
||||||
|
;; guile-bash expect.
|
||||||
|
(let ((include (string-append (assoc-ref outputs "include")
|
||||||
|
"/include/bash"))
|
||||||
|
(headers "^\\./(builtins/|lib/glob/|lib/tilde/|)[^/]+\\.h$"))
|
||||||
|
(mkdir-p include)
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(when ((@ (ice-9 regex) string-match) headers file)
|
||||||
|
(let ((directory (string-append include "/"
|
||||||
|
(dirname file))))
|
||||||
|
(mkdir-p directory)
|
||||||
|
(copy-file file
|
||||||
|
(string-append directory "/"
|
||||||
|
(basename file))))))
|
||||||
|
(find-files "." "\\.h$"))
|
||||||
|
#t)))
|
||||||
(version "4.3"))
|
(version "4.3"))
|
||||||
(package
|
(package
|
||||||
(name "bash")
|
(name "bash")
|
||||||
|
@ -147,6 +167,9 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
|
||||||
(version (string-append version "."
|
(version (string-append version "."
|
||||||
(number->string (length %patch-series-4.3))))
|
(number->string (length %patch-series-4.3))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
|
|
||||||
|
(outputs '("out"
|
||||||
|
"include")) ;headers used by extensions
|
||||||
(native-inputs `(("bison" ,bison))) ;to rebuild the parser
|
(native-inputs `(("bison" ,bison))) ;to rebuild the parser
|
||||||
(inputs `(("readline" ,readline)
|
(inputs `(("readline" ,readline)
|
||||||
("ncurses" ,ncurses))) ;TODO: add texinfo
|
("ncurses" ,ncurses))) ;TODO: add texinfo
|
||||||
|
@ -168,9 +191,10 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
|
||||||
;; for now.
|
;; for now.
|
||||||
#:tests? #f
|
#:tests? #f
|
||||||
|
|
||||||
#:phases (alist-cons-after 'install 'post-install
|
#:phases (modify-phases %standard-phases
|
||||||
,post-install-phase
|
(add-after install post-install ,post-install-phase)
|
||||||
%standard-phases)))
|
(add-after install install-headers
|
||||||
|
,install-headers-phase))))
|
||||||
(synopsis "The GNU Bourne-Again SHell")
|
(synopsis "The GNU Bourne-Again SHell")
|
||||||
(description
|
(description
|
||||||
"Bash is the shell, or command-line interpreter, of the GNU system. It
|
"Bash is the shell, or command-line interpreter, of the GNU system. It
|
||||||
|
|
Loading…
Reference in New Issue