diff options
| author | Eric Bavier <bavier@member.fsf.org> | 2015-11-01 09:48:35 -0600 |
|---|---|---|
| committer | Eric Bavier <bavier@member.fsf.org> | 2015-11-03 17:07:09 -0600 |
| commit | e5930e5a13b878f8ea46aa87f0c638421f32ab59 (patch) | |
| tree | 662135dd9f8b785f35ff0bda05d151fbb898a4e2 | |
| parent | 718c5dd6e1f009540c6876a0f69ebe4d1268151a (diff) | |
gnu: newt: Build python bindings.
* gnu/packages/slang.scm (newt)[outputs]: New field.
[arguments]: Add #:make-flags argument. Add 'move-python' phase.
| -rw-r--r-- | gnu/packages/slang.scm | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/gnu/packages/slang.scm b/gnu/packages/slang.scm index a00fa7b01e9..24ec71ed3e4 100644 --- a/gnu/packages/slang.scm +++ b/gnu/packages/slang.scm | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 4 | ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> | ||
| 4 | ;;; | 5 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 6 | ;;; This file is part of GNU Guix. |
| 6 | ;;; | 7 | ;;; |
| @@ -20,6 +21,7 @@ | |||
| 20 | (define-module (gnu packages slang) | 21 | (define-module (gnu packages slang) |
| 21 | #:use-module (guix packages) | 22 | #:use-module (guix packages) |
| 22 | #:use-module (guix download) | 23 | #:use-module (guix download) |
| 24 | #:use-module (guix utils) | ||
| 23 | #:use-module (guix build-system gnu) | 25 | #:use-module (guix build-system gnu) |
| 24 | #:use-module ((guix licenses) #:prefix license:) | 26 | #:use-module ((guix licenses) #:prefix license:) |
| 25 | #:use-module (gnu packages readline) | 27 | #:use-module (gnu packages readline) |
| @@ -28,7 +30,8 @@ | |||
| 28 | #:use-module (gnu packages fribidi) | 30 | #:use-module (gnu packages fribidi) |
| 29 | #:use-module (gnu packages compression) | 31 | #:use-module (gnu packages compression) |
| 30 | #:use-module (gnu packages image) | 32 | #:use-module (gnu packages image) |
| 31 | #:use-module (gnu packages pcre)) | 33 | #:use-module (gnu packages pcre) |
| 34 | #:use-module (gnu packages python)) | ||
| 32 | 35 | ||
| 33 | (define-public slang | 36 | (define-public slang |
| 34 | (package | 37 | (package |
| @@ -85,15 +88,22 @@ slsh, which is part of the S-Lang distribution.") | |||
| 85 | (base32 | 88 | (base32 |
| 86 | "07n9f2mqsjfj35wx5ldhvl9sqcjqpcl0g4fdd9mawmny9rihw6vp")))) | 89 | "07n9f2mqsjfj35wx5ldhvl9sqcjqpcl0g4fdd9mawmny9rihw6vp")))) |
| 87 | (build-system gnu-build-system) | 90 | (build-system gnu-build-system) |
| 91 | (outputs '("out" "python")) | ||
| 88 | (inputs | 92 | (inputs |
| 89 | `(("slang" ,slang) | 93 | `(("slang" ,slang) |
| 90 | ("popt" ,popt) | 94 | ("popt" ,popt) |
| 95 | ("python" ,python) | ||
| 91 | ("fribidi" ,fribidi))) | 96 | ("fribidi" ,fribidi))) |
| 92 | (arguments | 97 | (arguments |
| 93 | `(#:tests? #f ; no test suite | 98 | `(#:tests? #f ; no test suite |
| 94 | #:configure-flags | 99 | #:configure-flags |
| 95 | ;; Set the correct RUNPATH in binaries. | 100 | ;; Set the correct RUNPATH in binaries. |
| 96 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) | 101 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) |
| 102 | #:make-flags | ||
| 103 | ;; configure does not allow us to override this variable from the | ||
| 104 | ;; command-line. Fortunately, the Makefile does, so provide it here. | ||
| 105 | (list (string-append "PYTHONVERS=python" | ||
| 106 | ,(version-major+minor (package-version python)))) | ||
| 97 | #:phases | 107 | #:phases |
| 98 | (modify-phases %standard-phases | 108 | (modify-phases %standard-phases |
| 99 | (add-after | 109 | (add-after |
| @@ -101,7 +111,17 @@ slsh, which is part of the S-Lang distribution.") | |||
| 101 | (lambda _ | 111 | (lambda _ |
| 102 | (substitute* "po/Makefile" | 112 | (substitute* "po/Makefile" |
| 103 | (("/usr/bin/install") "install")) | 113 | (("/usr/bin/install") "install")) |
| 104 | #t))))) | 114 | #t)) |
| 115 | (add-after | ||
| 116 | 'install 'move-python | ||
| 117 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 118 | (let ((out (assoc-ref outputs "out")) | ||
| 119 | (py (assoc-ref outputs "python")) | ||
| 120 | (ver ,(version-major+minor (package-version python)))) | ||
| 121 | (mkdir-p (string-append py "/lib")) | ||
| 122 | (rename-file (string-append out "/lib/python" ver) | ||
| 123 | (string-append py "/lib/python" ver)) | ||
| 124 | #t)))))) | ||
| 105 | (home-page "https://fedorahosted.org/newt/") | 125 | (home-page "https://fedorahosted.org/newt/") |
| 106 | (synopsis "Not Erik's Windowing Toolkit - text mode windowing with slang") | 126 | (synopsis "Not Erik's Windowing Toolkit - text mode windowing with slang") |
| 107 | (description | 127 | (description |
