* [bug#34903] [PATCH] build-system/meson: Add #:disallowed-references.
@ 2019-03-18 13:55 Marius Bakke
2019-03-19 10:19 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2019-03-18 13:55 UTC (permalink / raw)
To: 34903
* 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#34903] [PATCH] build-system/meson: Add #:disallowed-references.
2019-03-18 13:55 [bug#34903] [PATCH] build-system/meson: Add #:disallowed-references Marius Bakke
@ 2019-03-19 10:19 ` Ludovic Courtès
2019-03-21 18:38 ` bug#34903: " Marius Bakke
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2019-03-19 10:19 UTC (permalink / raw)
To: Marius Bakke; +Cc: 34903
Hi Marius!
Marius Bakke <mbakke@fastmail.com> skribis:
> * guix/build-system/meson.scm (meson-build): Add #:disallowed-references.
Go for it!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#34903: [PATCH] build-system/meson: Add #:disallowed-references.
2019-03-19 10:19 ` Ludovic Courtès
@ 2019-03-21 18:38 ` Marius Bakke
0 siblings, 0 replies; 3+ messages in thread
From: Marius Bakke @ 2019-03-21 18:38 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 34903-done
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
> Hi Marius!
>
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> * guix/build-system/meson.scm (meson-build): Add #:disallowed-references.
>
> Go for it!
Thanks! I went ahead and added #:allowed-references while at it and
pushed as ad4910eec06047124d29cb9a8d4b40dafdb71630.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-21 18:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 13:55 [bug#34903] [PATCH] build-system/meson: Add #:disallowed-references Marius Bakke
2019-03-19 10:19 ` Ludovic Courtès
2019-03-21 18:38 ` bug#34903: " Marius Bakke
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.