[PATCH] guix: profiles: Add new manifest generator.

  • Open
  • quality assurance status badge
Details
One participant
  • Romain GARBAGE
Owner
unassigned
Submitted by
Romain GARBAGE
Severity
normal

Debbugs page

R
R
Romain GARBAGE wrote 4 days ago
(address . guix-patches@gnu.org)
20250106153725.27660-1-romain.garbage@inria.fr
* 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(+)

Toggle diff (63 lines)
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
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75408@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75408
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch