From patchwork Mon Jan 6 15:37:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain GARBAGE X-Patchwork-Id: 36686 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BCA6627BBE9; Mon, 6 Jan 2025 15:38:52 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4DC1F27BBE2 for ; Mon, 6 Jan 2025 15:38:51 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUpB7-0006mc-CU; Mon, 06 Jan 2025 10:38:05 -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 1tUpB5-0006ls-3P for guix-patches@gnu.org; Mon, 06 Jan 2025 10:38:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUpB4-0007IV-Jm for guix-patches@gnu.org; Mon, 06 Jan 2025 10:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=9S/fltF6rJIajDPDqBMk+t/siDv2Aql6/kDTioSak34=; b=BZbMQB2JcSJ+f72OLm9H8KqbJGuwcVN8mhVOlzH41jjMEU5H2Ch9GuO5PQvF7hp7WSqKSX1Pw2dedjM9BqSZgBfe+dsRCmI2sPVCbMEQGVhzqqhUH6uTgL93c65+dgs6lWyHJpq5nUoPw3Uf2yPy6WYmztQe/KRVb019+yNhauspZalmPNp5s/BqJlt3IiMidCE+/1auiXFIm3U32GAmU1z0RMorEK4UZ9c3qoWa5UoYdcUFf5G0u2K5n0R0XinBxBc64HJRQnjhvErfLweNr8NFaNVcdcgLJlC0RKnuycwdN7GcyydiHXo/OlRJrifOAUqHndRj3MTZqcixgn0vHQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUpB3-00033y-TY for guix-patches@gnu.org; Mon, 06 Jan 2025 10:38:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75408] [PATCH] guix: profiles: Add new manifest generator. Resent-From: Romain GARBAGE Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Jan 2025 15:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75408 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75408@debbugs.gnu.org Cc: ludovic.courtes@inria.fr, Romain GARBAGE X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173617787411753 (code B ref -1); Mon, 06 Jan 2025 15:38:01 +0000 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 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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(+) base-commit: 831b94a1efcea8f793afc949b5123a6235c9bb1a 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)