From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:48305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5skL-0006nf-JU for guix-patches@gnu.org; Mon, 18 Mar 2019 09:56:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5skJ-0002Gz-Dy for guix-patches@gnu.org; Mon, 18 Mar 2019 09:56:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35424) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5skF-0002Dl-A6 for guix-patches@gnu.org; Mon, 18 Mar 2019 09:56:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h5skE-0001TL-MQ for guix-patches@gnu.org; Mon, 18 Mar 2019 09:56:03 -0400 Subject: [bug#34903] [PATCH] build-system/meson: Add #:disallowed-references. Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:48184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5sjx-0006X9-J9 for guix-patches@gnu.org; Mon, 18 Mar 2019 09:55:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5sjt-00023h-PC for guix-patches@gnu.org; Mon, 18 Mar 2019 09:55:43 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:51443) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h5sjs-000227-UW for guix-patches@gnu.org; Mon, 18 Mar 2019 09:55:41 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C8297220B9 for ; Mon, 18 Mar 2019 09:55:38 -0400 (EDT) Received: from localhost (140.226.16.62.customer.cdi.no [62.16.226.140]) by mail.messagingengine.com (Postfix) with ESMTPA id 3F3A11030F for ; Mon, 18 Mar 2019 09:55:38 -0400 (EDT) From: Marius Bakke Date: Mon, 18 Mar 2019 14:55:36 +0100 Message-Id: <20190318135536.5274-1-mbakke@fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 34903@debbugs.gnu.org * 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 -;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2018, 2019 Marius Bakke ;;; ;;; 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