gnu: weechat: Make sure it finds the correct python.

Fixes <https://bugs.gnu.org/21879>.

* gnu/packages/irc.scm (weechat)[arguments]: Drop 'set-python-file-name' phase
in favor of a 'wrap' phase.
This commit is contained in:
Marius Bakke 2017-02-04 15:51:50 +01:00
parent bafd5bea97
commit 507809be15
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 8 additions and 8 deletions

View File

@ -4,6 +4,7 @@
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 ng0 <ng0@libertad.pw> ;;; Copyright © 2016 ng0 <ng0@libertad.pw>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -180,14 +181,13 @@ SILC and ICB protocols via plugins.")
(add-before 'configure 'autogen (add-before 'configure 'autogen
(lambda _ (lambda _
(zero? (system* "./autogen.sh")))) (zero? (system* "./autogen.sh"))))
(add-before 'build 'set-python-file-name (add-after 'install 'wrap
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "src/plugins/python/weechat-python.c" (let ((out (assoc-ref outputs "out"))
(("python2_bin = weechat_python_get_python2_bin.*;") (py2 (assoc-ref inputs "python")))
(string-append "python2_bin = strdup (\"" (wrap-program (string-append out "/bin/weechat")
(assoc-ref inputs "python") `("PATH" ":" prefix (,(string-append py2 "/bin"))))
"/bin/python\");\n"))) #t))))))
#t)))))
(synopsis "Extensible chat client") (synopsis "Extensible chat client")
(description "WeeChat (Wee Enhanced Environment for Chat) is an (description "WeeChat (Wee Enhanced Environment for Chat) is an
Internet Relay Chat client, which is designed to be light and fast. Internet Relay Chat client, which is designed to be light and fast.