summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-06-18 09:20:22 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-06-25 14:27:59 +0200
commitc210dbe43e554c1f0e7dc645c1e2bd3c29505ffc (patch)
tree0ae7afe6d93c660c1747ee8a12ad8fc216ba24ef /gnu/packages
parent5abcfe7a795467f4cbfc0a3f142e2a7156374d67 (diff)
downloadguix-c210dbe43e554c1f0e7dc645c1e2bd3c29505ffc.tar.gz
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’.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/databases.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 42b394daf2..94c3c31fc4 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1559,7 +1559,22 @@ organized in a hash table or B+ tree.")
            #~(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