mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
build-system/meson: Add #:allowed-references and #:disallowed-references.
* guix/build-system/meson.scm (meson-build): Add support for #:allowed-references and #:disallowed-references.
This commit is contained in:
parent
c1f4e6491c
commit
ad4910eec0
1 changed files with 27 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
|
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
|
||||||
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -109,9 +109,25 @@ (define* (meson-build store name inputs
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
(imported-modules %meson-build-system-modules)
|
(imported-modules %meson-build-system-modules)
|
||||||
(modules '((guix build meson-build-system)
|
(modules '((guix build meson-build-system)
|
||||||
(guix build utils))))
|
(guix build utils)))
|
||||||
|
allowed-references
|
||||||
|
disallowed-references)
|
||||||
"Build SOURCE using MESON, and with INPUTS, assuming that SOURCE
|
"Build SOURCE using MESON, and with INPUTS, assuming that SOURCE
|
||||||
has a 'meson.build' file."
|
has a 'meson.build' file."
|
||||||
|
|
||||||
|
;; TODO: Copied from build-system/gnu, factorize this!
|
||||||
|
(define canonicalize-reference
|
||||||
|
(match-lambda
|
||||||
|
((? package? p)
|
||||||
|
(derivation->output-path (package-derivation store p system
|
||||||
|
#:graft? #f)))
|
||||||
|
(((? package? p) output)
|
||||||
|
(derivation->output-path (package-derivation store p system
|
||||||
|
#:graft? #f)
|
||||||
|
output))
|
||||||
|
((? string? output)
|
||||||
|
output)))
|
||||||
|
|
||||||
(define builder
|
(define builder
|
||||||
`(let ((build-phases (if ,glib-or-gtk?
|
`(let ((build-phases (if ,glib-or-gtk?
|
||||||
,phases
|
,phases
|
||||||
|
@ -159,7 +175,15 @@ (define guile-for-build
|
||||||
#:inputs inputs
|
#:inputs inputs
|
||||||
#:modules imported-modules
|
#:modules imported-modules
|
||||||
#:outputs outputs
|
#:outputs outputs
|
||||||
#:guile-for-build guile-for-build))
|
#:guile-for-build guile-for-build
|
||||||
|
#:allowed-references
|
||||||
|
(and allowed-references
|
||||||
|
(map canonicalize-reference
|
||||||
|
allowed-references))
|
||||||
|
#:disallowed-references
|
||||||
|
(and disallowed-references
|
||||||
|
(map canonicalize-reference
|
||||||
|
disallowed-references))))
|
||||||
|
|
||||||
(define meson-build-system
|
(define meson-build-system
|
||||||
(build-system
|
(build-system
|
||||||
|
|
Loading…
Reference in a new issue