diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-03-17 16:32:24 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-03-21 19:23:47 +0100 |
commit | ad4910eec06047124d29cb9a8d4b40dafdb71630 (patch) | |
tree | 98801e7b7a4f15541ba15752ebfbeb676fb4145b | |
parent | c1f4e6491cecc5d121ef371a8fb2aa0a07030d36 (diff) | |
download | patches-ad4910eec06047124d29cb9a8d4b40dafdb71630.tar patches-ad4910eec06047124d29cb9a8d4b40dafdb71630.tar.gz |
build-system/meson: Add #:allowed-references and #:disallowed-references.
* guix/build-system/meson.scm (meson-build): Add support for
#:allowed-references and #:disallowed-references.
-rw-r--r-- | guix/build-system/meson.scm | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 8d49020454..370d185545 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; 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. ;;; @@ -109,9 +109,25 @@ (system (%current-system)) (imported-modules %meson-build-system-modules) (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 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 `(let ((build-phases (if ,glib-or-gtk? ,phases @@ -159,7 +175,15 @@ has a 'meson.build' file." #:inputs inputs #:modules imported-modules #: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 (build-system |