GNU bug report logs - #75408
[PATCH] guix: profiles: Add new manifest generator.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Romain GARBAGE <romain.garbage@HIDDEN>; Keywords: patch; dated Mon, 6 Jan 2025 15:38:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Jan 2025 15:37:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 06 10:37:53 2025
Received: from localhost ([127.0.0.1]:39711 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUpAv-00033V-Cr
	for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 10:37:53 -0500
Received: from lists.gnu.org ([2001:470:142::17]:46448)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <romain.garbage@HIDDEN>)
 id 1tUpAt-00033E-QF
 for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 10:37:52 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <romain.garbage@HIDDEN>)
 id 1tUpAo-0006l7-64
 for guix-patches@HIDDEN; Mon, 06 Jan 2025 10:37:46 -0500
Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <romain.garbage@HIDDEN>)
 id 1tUpAk-0007H3-D7
 for guix-patches@HIDDEN; Mon, 06 Jan 2025 10:37:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc;
 h=from:to:cc:subject:date:message-id:mime-version:
 content-transfer-encoding;
 bh=9S/fltF6rJIajDPDqBMk+t/siDv2Aql6/kDTioSak34=;
 b=E4M8iK74OKbLQlsbssSgQlzEzUTE82g51DV2Mkax29VIHTUv9xEN2YUO
 8obzCGr5+O38uGOYVn1nUaGSUHv3NKGBkhJUykIwwHXJKIDjM0qlSUg2M
 6F4QZZOw5J9+CmIlmNIn1on1a9isvbYFBvtvAQaQ7LGJR8AjRxKpLo6qw g=;
Authentication-Results: mail3-relais-sop.national.inria.fr;
 dkim=none (message not signed) header.i=none;
 spf=SoftFail smtp.mailfrom=romain.garbage@HIDDEN;
 dmarc=fail (p=none dis=none) d=inria.fr
X-IronPort-AV: E=Sophos;i="6.12,293,1728943200"; d="scan'208";a="105594925"
Received: from unknown (HELO guix-A102.bordeaux.inria.fr) ([193.50.110.191])
 by mail3-relais-sop.national.inria.fr with
 ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2025 16:37:38 +0100
From: Romain GARBAGE <romain.garbage@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] guix: profiles: Add new manifest generator.
Date: Mon,  6 Jan 2025 16:37:25 +0100
Message-ID: <20250106153725.27660-1-romain.garbage@HIDDEN>
X-Mailer: git-send-email 2.46.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=192.134.164.104;
 envelope-from=romain.garbage@HIDDEN; helo=mail3-relais-sop.national.inria.fr
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: ludovic.courtes@HIDDEN, Romain GARBAGE <romain.garbage@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/profiles.scm (build-system->manifest): New variable.
* doc/guix.texi (Writing Manifests): Document new procedure.

Change-Id: Ib8336232a0cd17168d7ea6aac5d9ee301309f12a
---
 doc/guix.texi     | 15 +++++++++++++++
 guix/profiles.scm | 15 +++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index da4d2f5ebc..309c48dcc4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9068,6 +9068,21 @@ line, which can often be more convenient.
 
 @c TODO: specifications->package, etc.
 
+@deffn {Procedure} build-system->manifest build-system
+Given @var{build-system}, a variable referring to a build system value
+suitable for the @code{build-system} field in the @code{package} record
+type.
+
+In order to be able to use a build system variable, the corresponding
+module must be loaded, as in the following example:
+
+@lisp
+(use-modules (guix build-system  cmake))
+
+(build-system->manifest cmake-build-system)
+@end lisp
+@end deffn
+
 
 @node Build Systems
 @section Build Systems
diff --git a/guix/profiles.scm b/guix/profiles.scm
index a28cf872cf..b31943fe15 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -127,6 +127,7 @@ (define-module (guix profiles)
             package->manifest-entry
             package->development-manifest
             packages->manifest
+            build-system->manifest
             ca-certificate-bundle
             %default-profile-hooks
             %manifest-format-version
@@ -454,6 +455,20 @@ (define (inferior->entry)
          packages)
     manifest-entry=?)))
 
+(define (build-system->manifest build-system)
+  "Return a manifest containing the list of packages pulled by BUILD-SYSTEM, a
+variable that defines a build system suitable for the PACKAGE record type."
+  (let ((empty-package (package
+                         (name "empty")
+                         (version "1")
+                         (source #f)
+                         (build-system build-system)
+                         (home-page #f)
+                         (synopsis #f)
+                         (description #f)
+                         (license #f))))
+    (package->development-manifest empty-package)))
+
 (define %manifest-format-version
   ;; The current manifest format version.
   4)

base-commit: 831b94a1efcea8f793afc949b5123a6235c9bb1a
-- 
2.46.0





Acknowledgement sent to Romain GARBAGE <romain.garbage@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#75408; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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