From unknown Wed Jun 18 23:16:45 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#75408 <75408@debbugs.gnu.org> To: bug#75408 <75408@debbugs.gnu.org> Subject: Status: [PATCH] guix: profiles: Add new manifest generator. Reply-To: bug#75408 <75408@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:16:45 +0000 retitle 75408 [PATCH] guix: profiles: Add new manifest generator. reassign 75408 guix-patches submitter 75408 Romain GARBAGE severity 75408 normal tag 75408 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 10:37:53 2025 Received: (at submit) by debbugs.gnu.org; 6 Jan 2025 15:37:54 +0000 Received: from localhost ([127.0.0.1]:39711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUpAv-00033V-Cr for submit@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 ) id 1tUpAt-00033E-QF for submit@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 ) id 1tUpAo-0006l7-64 for guix-patches@gnu.org; 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 ) id 1tUpAk-0007H3-D7 for guix-patches@gnu.org; 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@inria.fr; 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 To: guix-patches@gnu.org Subject: [PATCH] guix: profiles: Add new manifest generator. Date: Mon, 6 Jan 2025 16:37:25 +0100 Message-ID: <20250106153725.27660-1-romain.garbage@inria.fr> 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@inria.fr; 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@inria.fr, Romain GARBAGE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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