Update guix recipe
guix.scm
52 | 52 | (version "0.1") | |
53 | 53 | (source (git-checkout (url (dirname (current-filename))))) | |
54 | 54 | (build-system gnu-build-system) | |
55 | + | (arguments | |
56 | + | `(#:modules ((guix build utils) | |
57 | + | (guix build gnu-build-system) | |
58 | + | (ice-9 rdelim) | |
59 | + | (ice-9 popen)) | |
60 | + | #:make-flags (list "GUILE_AUTO_COMPILE=0") | |
61 | + | #:phases | |
62 | + | (modify-phases %standard-phases | |
63 | + | (add-after 'install-bin 'wrap-program | |
64 | + | (lambda* (#:key inputs outputs #:allow-other-keys) | |
65 | + | ;; Wrap the 'gitile' command to refer to the right modules. | |
66 | + | (let* ((out (assoc-ref outputs "out")) | |
67 | + | (commonmark (assoc-ref inputs "guile-commonmark")) | |
68 | + | (git (assoc-ref inputs "guile-git")) | |
69 | + | (bytes (assoc-ref inputs "guile-bytestructures")) | |
70 | + | (fibers (assoc-ref inputs "guile-fibers")) | |
71 | + | (gcrypt (assoc-ref inputs "guile-gcrypt")) | |
72 | + | (syntax-highlight (assoc-ref inputs "guile-syntax-highlight")) | |
73 | + | (deps (list out commonmark git bytes fibers gcrypt | |
74 | + | syntax-highlight)) | |
75 | + | (guile (assoc-ref %build-inputs "guile")) | |
76 | + | (effective (read-line | |
77 | + | (open-pipe* OPEN_READ | |
78 | + | (string-append guile "/bin/guile") | |
79 | + | "-c" "(display (effective-version))"))) | |
80 | + | (mods (string-drop-right ;drop trailing colon | |
81 | + | (string-join deps | |
82 | + | (string-append "/share/guile/site/" | |
83 | + | effective ":") | |
84 | + | 'suffix) | |
85 | + | 1)) | |
86 | + | (objs (string-drop-right | |
87 | + | (string-join deps | |
88 | + | (string-append "/lib/guile/" effective | |
89 | + | "/site-ccache:") | |
90 | + | 'suffix) | |
91 | + | 1))) | |
92 | + | (wrap-program (string-append out "/bin/gitile") | |
93 | + | `("GUILE_LOAD_PATH" ":" prefix (,mods)) | |
94 | + | `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs))))))))) | |
55 | 95 | (propagated-inputs | |
56 | 96 | `(("guile-commonmark" ,guile-commonmark) | |
57 | 97 | ("guile-git" ,guile-git) |