gnu: guile-wisp: Move .go files to 'lib/guile/2.2/site-ccache'.
* gnu/packages/guile.scm (guile-wisp)[arguments]: Remove (system base compile) from #:modules, and (ice-9 rdelim) and (ice-9 popen). In 'install-go-files' phase, invoke 'guild' to compile, and write to lib/guile/X.Y/site-ccache.
This commit is contained in:
parent
89c4bfe7f8
commit
e8374e6912
|
@ -1274,8 +1274,11 @@ key-value cache and store.")
|
||||||
"1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr"))))
|
"1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((system base compile)
|
`(#:modules ((guix build gnu-build-system)
|
||||||
,@%gnu-build-system-modules)
|
(guix build utils)
|
||||||
|
(ice-9 rdelim)
|
||||||
|
(ice-9 popen))
|
||||||
|
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'configure 'substitute-before-config
|
(add-before 'configure 'substitute-before-config
|
||||||
|
@ -1300,14 +1303,22 @@ key-value cache and store.")
|
||||||
(add-after 'install 'install-go-files
|
(add-after 'install 'install-go-files
|
||||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
(lambda* (#:key outputs inputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(module-dir (string-append out "/share/guile/site")))
|
(effective (read-line
|
||||||
|
(open-pipe* OPEN_READ
|
||||||
|
"guile" "-c"
|
||||||
|
"(display (effective-version))")))
|
||||||
|
(module-dir (string-append out "/share/guile/site/"
|
||||||
|
effective))
|
||||||
|
(object-dir (string-append out "/lib/guile/" effective
|
||||||
|
"/site-ccache"))
|
||||||
|
(prefix (string-length module-dir)))
|
||||||
;; compile to the destination
|
;; compile to the destination
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (file)
|
||||||
(compile-file file
|
(let* ((base (string-drop (string-drop-right file 4)
|
||||||
#:output-file
|
prefix))
|
||||||
(string-append
|
(go (string-append object-dir base ".go")))
|
||||||
(string-drop-right file 4)
|
(invoke "guild" "compile" "-L" module-dir
|
||||||
".go")))
|
file "-o" go)))
|
||||||
(find-files module-dir "\\.scm$"))
|
(find-files module-dir "\\.scm$"))
|
||||||
#t))))))
|
#t))))))
|
||||||
(home-page "http://draketo.de/english/wisp")
|
(home-page "http://draketo.de/english/wisp")
|
||||||
|
|
Loading…
Reference in New Issue