gnu: guile-hall: Wrap with guile-config.

* gnu/packages/guile-xyz.scm (guile-hall)[arguments]: Extend
"hall-wrap-binaries" phase to include guile-config in the load path.
This commit is contained in:
Ricardo Wurmus 2019-01-31 16:21:43 +01:00
parent adba64662c
commit 395a95bb75
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1159,34 +1159,30 @@ (define-public guile-hall
(ice-9 ftw) (ice-9 ftw)
,@%gnu-build-system-modules) ,@%gnu-build-system-modules)
#:phases #:phases
(modify-phases (modify-phases %standard-phases
%standard-phases (add-after 'install 'hall-wrap-binaries
(add-after (lambda* (#:key inputs outputs #:allow-other-keys)
'install (let* ((out (assoc-ref outputs "out"))
'hall-wrap-binaries (bin (string-append out "/bin/"))
(lambda* (#:key outputs #:allow-other-keys) (site (string-append out "/share/guile/site"))
(let* ((out (assoc-ref outputs "out")) (config (assoc-ref inputs "guile-config")))
(bin (string-append out "/bin/"))
(site (string-append out "/share/guile/site")))
(match (scandir site) (match (scandir site)
(("." ".." version) (("." ".." version)
(let ((modules (string-append site "/" version)) (let ((modules (string-append site "/" version))
(compiled-modules (compiled-modules (string-append
(string-append out "/lib/guile/" version
out "/site-ccache")))
"/lib/guile/" (wrap-program (string-append bin "hall")
version `("GUILE_LOAD_PATH" ":" prefix
"/site-ccache"))) (,modules
(for-each ,(string-append config
(lambda (file) "/share/guile/site/"
(wrap-program version)))
(string-append bin file) `("GUILE_LOAD_COMPILED_PATH" ":" prefix
`("GUILE_LOAD_PATH" ":" prefix (,modules)) (,compiled-modules
`("GUILE_LOAD_COMPILED_PATH" ,(string-append config "/lib/guile/"
":" version
prefix "/site-ccache"))))
(,compiled-modules))))
,(list 'list "hall"))
#t))))))))) #t)))))))))
(native-inputs (native-inputs
`(("autoconf" ,autoconf) `(("autoconf" ,autoconf)
@ -1202,8 +1198,7 @@ (define-public guile-hall
allow you to quickly create and publish Guile projects. It allows you to allow you to quickly create and publish Guile projects. It allows you to
transparently support the GNU build system, manage a project hierarchy & transparently support the GNU build system, manage a project hierarchy &
provides tight coupling to Guix.") provides tight coupling to Guix.")
(home-page (home-page "https://gitlab.com/a-sassmannshausen/guile-hall")
"https://gitlab.com/a-sassmannshausen/guile-hall")
(license license:gpl3+))) (license license:gpl3+)))
(define-public guile-ics (define-public guile-ics