gnu: recutils: Symlink bash loadables.

This makes it so that the "enable" builtin finds readrec and testrec without
having to supply the full store path.

* gnu/packages/databases.scm (recutils)[#:phases]: Add
‘symlink-bash-loadables’.
This commit is contained in:
Liliana Marie Prikler 2023-06-18 09:20:22 +02:00
parent 5abcfe7a79
commit c210dbe43e
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -1559,7 +1559,22 @@ (define-public recutils
#~(list "--disable-static"
(string-append "--with-bash-headers="
(search-input-directory %build-inputs
"include/bash")))))
"include/bash")))
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'symlink-bash-loadables
(lambda* (#:key outputs #:allow-other-keys)
(with-directory-excursion (string-append
(assoc-ref outputs "out")
"/lib")
(mkdir "bash")
(for-each
(compose symlink
(lambda (loadable)
(values
(string-append (getcwd) "/" loadable ".so")
(string-append "bash/" loadable))))
'("readrec" "testrec"))))))))
(native-inputs
(list bc check-0.14 pkg-config))
(inputs