GNU bug report logs - #34903
[PATCH] build-system/meson: Add #:disallowed-references.

Previous Next

Package: guix-patches;

Reported by: Marius Bakke <mbakke <at> fastmail.com>

Date: Mon, 18 Mar 2019 13:56:02 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34903 in the body.
You can then email your comments to 34903 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#34903; Package guix-patches. (Mon, 18 Mar 2019 13:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <mbakke <at> fastmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 18 Mar 2019 13:56:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] build-system/meson: Add #:disallowed-references.
Date: Mon, 18 Mar 2019 14:55:36 +0100
* 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 <at> gmail.com>
-;;; Copyright © 2018 Marius Bakke <mbakke <at> fastmail.com>
+;;; Copyright © 2018, 2019 Marius Bakke <mbakke <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#34903; Package guix-patches. (Tue, 19 Mar 2019 10:21:02 GMT) Full text and rfc822 format available.

Message #8 received at 34903 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 34903 <at> debbugs.gnu.org
Subject: Re: [bug#34903] [PATCH] build-system/meson: Add
 #:disallowed-references.
Date: Tue, 19 Mar 2019 11:19:52 +0100
Hi Marius!

Marius Bakke <mbakke <at> fastmail.com> skribis:

> * guix/build-system/meson.scm (meson-build): Add #:disallowed-references.

Go for it!

Ludo’.




Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Thu, 21 Mar 2019 18:39:01 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <mbakke <at> fastmail.com>:
bug acknowledged by developer. (Thu, 21 Mar 2019 18:39:02 GMT) Full text and rfc822 format available.

Message #13 received at 34903-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 34903-done <at> debbugs.gnu.org
Subject: Re: [bug#34903] [PATCH] build-system/meson: Add
 #:disallowed-references.
Date: Thu, 21 Mar 2019 19:38:49 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Marius!
>
> Marius Bakke <mbakke <at> 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.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 19 Apr 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.