gnu: wordnet: Use 'modify-phases'.

* gnu/packages/wordnet.scm (wordnet)[arguments]: Use 'modify-phases'.
This commit is contained in:
Efraim Flashner 2016-05-30 20:19:04 +03:00
parent c1dbd3a870
commit 983911d627
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 24 additions and 24 deletions

View File

@ -52,30 +52,30 @@
;; Provide the `result' field in `Tcl_Interp'. ;; Provide the `result' field in `Tcl_Interp'.
;; See <https://bugs.gentoo.org/show_bug.cgi?id=452034>. ;; See <https://bugs.gentoo.org/show_bug.cgi?id=452034>.
"CFLAGS=-DUSE_INTERP_RESULT") "CFLAGS=-DUSE_INTERP_RESULT")
#:phases (alist-cons-after #:phases
'install 'post-install (modify-phases %standard-phases
(lambda* (#:key inputs outputs #:allow-other-keys) (add-after 'install 'post-install
(let ((out (assoc-ref outputs "out")) (lambda* (#:key inputs outputs #:allow-other-keys)
(bin (assoc-ref outputs "tk")) (let ((out (assoc-ref outputs "out"))
(tk (assoc-ref inputs "tk")) (bin (assoc-ref outputs "tk"))
(tkv ,(let ((v (package-version tk))) (tk (assoc-ref inputs "tk"))
(string-take v (string-index-right v #\.))))) (tkv ,(let ((v (package-version tk)))
;; Move `wishwn' and `wnb' to BIN. (string-take v (string-index-right v #\.)))))
(for-each (lambda (prog) ;; Move `wishwn' and `wnb' to BIN.
(let ((orig (string-append out "/bin/" prog)) (for-each (lambda (prog)
(dst (string-append bin "/bin/" prog)) (let ((orig (string-append out "/bin/" prog))
(dir (string-append tk "/lib/tk" tkv))) (dst (string-append bin "/bin/" prog))
(mkdir-p (dirname dst)) (dir (string-append tk "/lib/tk" tkv)))
(copy-file orig dst) (mkdir-p (dirname dst))
(delete-file orig) (copy-file orig dst)
(wrap-program dst (delete-file orig)
`("TK_LIBRARY" "" = (,dir)) (wrap-program dst
`("PATH" ":" prefix `("TK_LIBRARY" "" = (,dir))
(,(string-append out `("PATH" ":" prefix
"/bin")))))) (,(string-append out
'("wishwn" "wnb")) "/bin"))))))
#t)) '("wishwn" "wnb"))
%standard-phases))) #t))))))
(outputs '("out" (outputs '("out"
"tk")) ; for the Tcl/Tk GUI "tk")) ; for the Tcl/Tk GUI
(inputs `(("tk" ,tk) (inputs `(("tk" ,tk)