gnu: guile-irregex: Remove hard-coded Guile effective version.
* gnu/packages/guile.scm (guile-irregex)[arguments]: Add (ice-9 popen) and (ice-9 rdelim). Remove nested 'use-modules' form. Call 'open-pipe*' to determine Guile's effective version, and use it to compute MODULE-DIR.
This commit is contained in:
parent
8f3afba44f
commit
fe447664d8
|
@ -632,6 +632,8 @@ See http://minikanren.org/ for more on miniKanren generally.")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((guix build utils)
|
`(#:modules ((guix build utils)
|
||||||
(ice-9 match)
|
(ice-9 match)
|
||||||
|
(ice-9 rdelim)
|
||||||
|
(ice-9 popen)
|
||||||
(guix build gnu-build-system))
|
(guix build gnu-build-system))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
@ -640,11 +642,13 @@ See http://minikanren.org/ for more on miniKanren generally.")
|
||||||
(delete 'check)
|
(delete 'check)
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(begin
|
|
||||||
(use-modules (guix build utils)
|
|
||||||
(ice-9 match))
|
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(module-dir (string-append out "/share/guile/site/2.0"))
|
(effective (read-line
|
||||||
|
(open-pipe* OPEN_READ
|
||||||
|
"guile" "-c"
|
||||||
|
"(display (effective-version))")))
|
||||||
|
(module-dir (string-append out "/share/guile/site/"
|
||||||
|
effective))
|
||||||
(source (assoc-ref inputs "source"))
|
(source (assoc-ref inputs "source"))
|
||||||
(doc (string-append out "/share/doc/guile-irregex/"))
|
(doc (string-append out "/share/doc/guile-irregex/"))
|
||||||
(guild (string-append (assoc-ref %build-inputs "guile")
|
(guild (string-append (assoc-ref %build-inputs "guile")
|
||||||
|
@ -683,7 +687,7 @@ See http://minikanren.org/ for more on miniKanren generally.")
|
||||||
|
|
||||||
;; Also copy over the README.
|
;; Also copy over the README.
|
||||||
(install-file "irregex.html" doc)
|
(install-file "irregex.html" doc)
|
||||||
#t)))))))
|
#t))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("guile" ,guile-2.0)))
|
`(("guile" ,guile-2.0)))
|
||||||
(home-page "http://synthcode.com/scheme/irregex")
|
(home-page "http://synthcode.com/scheme/irregex")
|
||||||
|
|
Loading…
Reference in New Issue