mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
gnu: meson: Extend the python path in the installed program.
* gnu/packages/build-tools.scm (meson-wrapped): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
a24b83d7ff
commit
021d3a32f5
1 changed files with 24 additions and 0 deletions
|
@ -287,6 +287,7 @@ (define-public meson
|
|||
(inputs `(("ninja" ,ninja)))
|
||||
(propagated-inputs `(("python" ,python)))
|
||||
(home-page "https://mesonbuild.com/")
|
||||
(properties '((hidden? . #t)))
|
||||
(synopsis "Build system designed to be fast and user-friendly")
|
||||
(description
|
||||
"The Meson build system is focused on user-friendliness and speed.
|
||||
|
@ -297,6 +298,29 @@ (define-public meson
|
|||
resembles Python.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public meson-wrapped
|
||||
(package/inherit meson
|
||||
(arguments
|
||||
`(;; FIXME: Tests require many additional inputs and patching many
|
||||
;; hard-coded file system locations in "run_unittests.py".
|
||||
#:tests? #f
|
||||
#:phases (modify-phases %standard-phases
|
||||
;; Meson calls the various executables in out/bin through the
|
||||
;; Python interpreter, so we cannot use the shell wrapper.
|
||||
(replace 'wrap
|
||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
||||
(let ((python-version
|
||||
(python-version (assoc-ref inputs "python")))
|
||||
(output (assoc-ref outputs "out")))
|
||||
(substitute* (string-append output "/bin/meson")
|
||||
(("# EASY-INSTALL-ENTRY-SCRIPT")
|
||||
(format #f "\
|
||||
import sys
|
||||
sys.path.insert(0, '~a/lib/python~a/site-packages')
|
||||
# EASY-INSTALL-ENTRY-SCRIPT"
|
||||
output python-version)))))))))
|
||||
(properties '())))
|
||||
|
||||
;;; This older Meson variant is kept for now for gtkmm and others that may
|
||||
;;; have problems with 0.60.
|
||||
(define-public meson-0.59
|
||||
|
|
Loading…
Reference in a new issue