From: Marius Bakke <mbakke@fastmail.com>
To: 34903@debbugs.gnu.org
Subject: [bug#34903] [PATCH] build-system/meson: Add #:disallowed-references.
Date: Mon, 18 Mar 2019 14:55:36 +0100 [thread overview]
Message-ID: <20190318135536.5274-1-mbakke@fastmail.com> (raw)
* guix/build-system/meson.scm (meson-build): Add #:disallowed-references.
---
guix/build-system/meson.scm | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index 8d49020454..3156f06b94 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)))
+
+ 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,11 @@ has a 'meson.build' file."
#:inputs inputs
#:modules imported-modules
#:outputs outputs
- #:guile-for-build guile-for-build))
+ #:guile-for-build guile-for-build
+ #:disallowed-references
+ (and disallowed-references
+ (map canonicalize-reference
+ disallowed-references))))
(define meson-build-system
(build-system
--
2.21.0
next reply other threads:[~2019-03-18 13:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-18 13:55 Marius Bakke [this message]
2019-03-19 10:19 ` [bug#34903] [PATCH] build-system/meson: Add #:disallowed-references Ludovic Courtès
2019-03-21 18:38 ` bug#34903: " Marius Bakke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190318135536.5274-1-mbakke@fastmail.com \
--to=mbakke@fastmail.com \
--cc=34903@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.