all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#75408] [PATCH] guix: profiles: Add new manifest generator.
@ 2025-01-06 15:37 Romain GARBAGE
  0 siblings, 0 replies; only message in thread
From: Romain GARBAGE @ 2025-01-06 15:37 UTC (permalink / raw)
  To: 75408; +Cc: ludovic.courtes, Romain GARBAGE

* 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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-06 15:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 15:37 [bug#75408] [PATCH] guix: profiles: Add new manifest generator Romain GARBAGE

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.