[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/09: build-system/meson: Add #:allowed-references and #:disallowed-ref
From: |
guix-commits |
Subject: |
02/09: build-system/meson: Add #:allowed-references and #:disallowed-references. |
Date: |
Thu, 21 Mar 2019 14:25:48 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit ad4910eec06047124d29cb9a8d4b40dafdb71630
Author: Marius Bakke <address@hidden>
Date: Sun Mar 17 16:32:24 2019 +0100
build-system/meson: Add #:allowed-references and #:disallowed-references.
* guix/build-system/meson.scm (meson-build): Add support for
#:allowed-references and #:disallowed-references.
---
guix/build-system/meson.scm | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index 8d49020..370d185 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 <address@hidden>
-;;; Copyright © 2018 Marius Bakke <address@hidden>
+;;; Copyright © 2018, 2019 Marius Bakke <address@hidden>
;;;
;;; 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
- branch master updated (af8f7eb -> 7ac8d96), guix-commits, 2019/03/21
- 03/09: gnu: elogind: Update to 241.1., guix-commits, 2019/03/21
- 02/09: build-system/meson: Add #:allowed-references and #:disallowed-references.,
guix-commits <=
- 05/09: gnu: varnish: Update to 6.2.0., guix-commits, 2019/03/21
- 07/09: gnu: glm: Update to 0.9.9.4., guix-commits, 2019/03/21
- 01/09: gnu: curl: Restore derivation., guix-commits, 2019/03/21
- 04/09: gnu: libgit2: Update to 0.28.1., guix-commits, 2019/03/21
- 09/09: gnu: gnupg: Update to 2.2.14., guix-commits, 2019/03/21
- 06/09: gnu: tbb: Update to 2019_U5., guix-commits, 2019/03/21
- 08/09: gnu: strace: Update to 5.0., guix-commits, 2019/03/21