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

Previous Next

Package: guix-patches;

Reported by: Romain GARBAGE <romain.garbage <at> inria.fr>

Date: Mon, 6 Jan 2025 15:38:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 75408 AT debbugs.gnu.org.

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#75408; Package guix-patches. (Mon, 06 Jan 2025 15:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Romain GARBAGE <romain.garbage <at> inria.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 06 Jan 2025 15:38:02 GMT) Full text and rfc822 format available.

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

From: Romain GARBAGE <romain.garbage <at> inria.fr>
To: guix-patches <at> gnu.org
Cc: ludovic.courtes <at> inria.fr, Romain GARBAGE <romain.garbage <at> inria.fr>
Subject: [PATCH] guix: profiles: Add new manifest generator.
Date: Mon,  6 Jan 2025 16:37:25 +0100
* 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





This bug report was last modified 162 days ago.

Previous Next


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