From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QMMCCRtLeGYrfQEA62LTzQ:P1 (envelope-from ) for ; Sun, 23 Jun 2024 16:19:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id QMMCCRtLeGYrfQEA62LTzQ (envelope-from ) for ; Sun, 23 Jun 2024 18:19:39 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=OUTLOOK.ES header.s=selector1 header.b=MHMJ1my3; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=outlook.es; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719159579; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=sh/wZ9Bk245H0f3nRmBSBOoXGv0zHjU9OLMiwKcQjKA=; b=pXIQmTvDTdMnOSfJxB7ab+Qq149yZHrhR0HdUDCM5AZt0zDFs0QqWVy6vYnBKPAQfOekJ8 rfSUK6ccUPpwqPOYMWHiJXHLo0XnqSulImICvtU9cCzKhid4lAJBB3vEXQ7djzh/VErqCt y+lJ75w7825JIw+1JyRvqnE28rPYxztLcme/nLX09pHZG76jpcIeE8699cKxEOCPvGbHnu hPNH3azIiwEleOR9MKHdusE4nZBh+PI8GA5sgnsIdC8MScDMUifR74ZpeHKwb7VIgmhp7P bOTB+abgs+KfE8hJclV0vNi6aJdLCU4vreh+E8EXIO97jalvjvW2njKUoToAWw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=OUTLOOK.ES header.s=selector1 header.b=MHMJ1my3; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=outlook.es; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1719159579; a=rsa-sha256; cv=pass; b=e6C+/raL2aiq+z1sGVPvV7JEHZvNgvG8AzK14nk+P+qPFiZcw3csa/+85gT2frfKUd68ax Gne8Qo5+76iaB4+YL62qfHhuBtXMvnC2tDHefoCGKvUZESH15StogjZVgg3/xAWfQRUY3K LMnLy5+yylJ4VvLJ0NkxzIL+7PfnToTMUe8g7udAGu7JTn5KZUwtviGe8Bp+gqyq0vmKsW r0rm54IHkSfL2Gy2jH+HDSxcCUGpcKlVjNWbxczuCUs5wa+PZGmkT8HqLfi4qAbbMP+2mq BMo0FxAwJjiZz4AkaNKEposcTrh/+bORXujSkdkGfPdQ1SKlSOmkA0UFlwGOGA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DE78F61404 for ; Sun, 23 Jun 2024 18:19:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLPvd-0000NO-0d; Sun, 23 Jun 2024 12:18:57 -0400 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 1sLPvc-0000NG-9b for guix-devel@gnu.org; Sun, 23 Jun 2024 12:18:56 -0400 Received: from mail-vi1eur04olkn2057.outbound.protection.outlook.com ([40.92.75.57] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLPva-0003ry-De for guix-devel@gnu.org; Sun, 23 Jun 2024 12:18:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cDosUmAqJrN4G0W0hGZhII9itxIVUXodCe4r9CraB22SIJPu4/1s1APc4o7NVr4GILuWnEEnX3hzYyNJJXNMLCMKpIz/x1M7LTCuD5ldJ+M/3BO627SlHYZmZ7O6erDKrFCvpiehibhxdXSZXQnupVRwEUVrW23iEAoHvzr/94yn0iNKDoUD3GUFidUcLMQKCiAljWxw8hqSPFyp5pvkbDaEt3NgT0enfEnBbMpmkBgPUe/9UlJjDcdunkPxvrOdjGRIt5vEyh8gtHM1GH+RX0sW/fVNDJdZrsk7T+ZV5B3Qc7VOW/vWDSMV3NqPu1pJ3bIzXpOaQfGVVL+bXFqywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sh/wZ9Bk245H0f3nRmBSBOoXGv0zHjU9OLMiwKcQjKA=; b=J1+Nak3LWzhKNKN/RtvjicgQ5g7IJM+Vo/tkAjAHVmHCUJ2soqKvGJRDKnM8+XkWGkO4JveZY1l+AKKjFN7MHIdQ4wNs3XXh1I0EwrjdCJs7IGkhFnauytsqVm/x/Vic7A8hG9H+xYn/0lm8J3v9SGA5V8JjBQDzlJSryZyerXTmYR38ENHAx/YEEVbmy6g/5gZ6EAgaKzz9fPDcfYZCEbOFoDelVOQkN3t4fJJIQyJ8gVgcKBI480cp8xWZ4caJimokG/IVQhk16Kf9ldn2I+F8OIP5tt0HGhlxBSmYMQIpM4lA54y9nDO5YSG7GUDKO+FcwSFPqJkR7p1QUpKSww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=OUTLOOK.ES; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sh/wZ9Bk245H0f3nRmBSBOoXGv0zHjU9OLMiwKcQjKA=; b=MHMJ1my3wUSp3gxavUNXcwZ3eJBYPbbCxaUpNGY3FirkRnRsYvfQkAT/aRTOmxPDkgiBf+qXTggyKYd+Nzfqya3RgPKoGsOzvQ0UHfGDzf96n1BjSBQtg4IOMJV2EovjJXJFlg6kxt5iXIz5BojqEaQD5jdhZiUMvLTPu0iSTWP5VdhvTecA29XC1Pg/BnDaDZ/pleDovevHBS2innsLd/DPeONtT9JaugVakxA4piyd3OWrfI6YeN/JZmo6KgeoitISJE1/lVLz4Qu+ylz/KVPoWPWZy2liM/Q+2C1fakkaNpFUN5KJHTH/32rne5iyB+KajZk5/Iqr3+7ugQ6Aig== Received: from PAXP251MB0348.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:20b::10) by DB9P251MB0426.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:325::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.26; Sun, 23 Jun 2024 16:13:50 +0000 Received: from PAXP251MB0348.EURP251.PROD.OUTLOOK.COM ([fe80::1f4f:1f6b:1817:f03f]) by PAXP251MB0348.EURP251.PROD.OUTLOOK.COM ([fe80::1f4f:1f6b:1817:f03f%7]) with mapi id 15.20.7698.025; Sun, 23 Jun 2024 16:13:50 +0000 From: Sergio Pastor =?utf-8?Q?P=C3=A9rez?= To: guix-devel@gnu.org Cc: michal_atlas+gnu@posteo.net, "juli@incana.org" Subject: New procedure to modify operating-system records Date: Sun, 23 Jun 2024 18:13:48 +0200 Message-ID: Content-Type: text/plain X-TMN: [FXqqE2qyjWjsnNW22XLzXLIkZOiquqO/] X-ClientProxiedBy: MA4P292CA0002.ESPP292.PROD.OUTLOOK.COM (2603:10a6:250:2d::19) To PAXP251MB0348.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:20b::10) X-Microsoft-Original-Message-ID: <84pls7iqmb.fsf@outlook.es> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXP251MB0348:EE_|DB9P251MB0426:EE_ X-MS-Office365-Filtering-Correlation-Id: fa217664-a117-40b2-e324-08dc939f77b8 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199025|3412199022|4302099010|440099025|1602099009|56899030; X-Microsoft-Antispam-Message-Info: UeARzCO7IcJqPT+T5evJpS1V5pNSpVwznPw1sKY5J8okBRNNymnp3NxeWWyzhWwjBxNI9QDBtUPaI2wa8fNwX+tgTTB/DFHoOQSNHhRUWp5wK7Uxfp8Xlz1fB1GCMOAfBE0zW0RVzqfjj3E1HscxMJXzN2DrYTvV6zAx2Bs915R0jyoU4Ak1DcCYois8WvlP6+wxcElBVQTtI5BRmiYNIAXu66NXgpzmPzGWSYzxgwcXgcWh5LnWtclg3769G6QveHVDZQz4q6t+KbqwEAieG0c3HoYpnEQyWUs9jvQFZNCFBAd9GBlG/e9oTrfVP2sH6GFGIAqhBw/RBXWVYENqvxyG4SIInpOycq6IPHS+Wc7ysBS+nk8JrCiR91QA9sdyk2v6dA89LJGu0Z7yrTrkoJyGD0t6DHIwoABO6DBTtYd9d+oKT8uk75e9ymLdaIy4yBZVQn1TfEavh/LV1dM4f0ZskiKlJJUMFzP84ztOT6koxH3wO62/LqQ2PKokGoWJNShaAgYo7AyHs4mYmD0Z+zXoK8DU2k7HiYa5Y6CHCUNaF4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vHpWIQlxldTvQneuLB9?= =?us-ascii?Q?Stgkua1FTInOX9ojuYQU98i4Bl3TA1lmNlA59UgM/JAgvp+xn6cG+pP/c5aI?= =?us-ascii?Q?G3ly7xv7F+7zD8BeUfMV/bmRC70qq1AB96FCGI+R6XG7yPvcWynO6aOsoXNY?= =?us-ascii?Q?BISU//5obQULedNz1/4QRZ4GbWSHO7Ha9TjuLmC+WwzHR0Ku+GSnzPoMsc8w?= =?us-ascii?Q?NeSfsEBqh2hSjiwxmZjZFacZp1LeJKqe2wj+5b+Jlh5MkHeo17R50rAhVA0e?= =?us-ascii?Q?sCIZiVM7qS6lLgO8KfqMyIz9zGEpM8kFJXkWq+gx3ZgpWH04CHIF38DXeOmP?= =?us-ascii?Q?YpIGIiXX+xcCR+/rjSBEMjk9iLlng1t4Xn9Egt8y7Q6U4+saoSZ1nKiOkVKY?= =?us-ascii?Q?eo+i1mRbh+pT7WgdrA965eJXzokL5n+Jx2/iJdXBHauiJR6+tNPcEqFvBpeA?= =?us-ascii?Q?RijqJtbaZjw2qLULlRPRm/MmbLGY8+X/0CiZ4gE16pJbIzdOQ4/HK2bgzQ+M?= =?us-ascii?Q?27D2cVBcNtBgkhgdjWEZaf/EURenNfvgJsUy/+5W0X372oXfU9ZG8suPHa4V?= =?us-ascii?Q?UuHGEEkZLS5zYtThn5bL?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-00b75.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: fa217664-a117-40b2-e324-08dc939f77b8 X-MS-Exchange-CrossTenant-AuthSource: PAXP251MB0348.EURP251.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2024 16:13:50.1148 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P251MB0426 Received-SPF: pass client-ip=40.92.75.57; envelope-from=sergio.pastorperez@outlook.es; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: DE78F61404 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -10.83 X-Spam-Score: -10.83 X-TUID: nqb2UXcK0f/+ Hello Guix. Some time ago, I disclosed on this mailing list that I was working on a procedure to facilitate modifications of Guile records. The idea was to be able to easily apply transformations to all `operating-system` record packages. I received a lot of help from Michal Atlas and Juliana Sims. Both of them are active members of this community, and I'm very grateful for how welcoming the have been. I'm writing this mail from a system that grafts `mesa` for the `nvidia-driver` available in [1]. Although I'm aware that this is not the place to discuss proprietary stuff, this is not about running an NVIDIA system. This enables any Guix user to arbitrarily replace packages system-wide. One could replace `glibc` for `glibc-custom`. I'm using the NVIDIA graft as an example because it's what I have at hand that would test that the graft applies system-wide effectively. The procedure allows the user to apply a function to all elements of a collection that match a certain type. With this new procedure one could write something like this: --8<---------------cut here---------------start------------->8--- (map-type (lambda (_) (@ (gnu packages games) cowsay)) (@ (guix packages) ) my-operating-system) --8<---------------cut here---------------end--------------->8--- Which will replace every package on the system for the `cowsay` package. Albeit a cowsified OS will not be very useful, other kinds of transformations could greatly simplify OS definitions. It would make it very convenient to deploy systems with grafts on important libraries that are dependencies of many packages. A more useful example would be this syntax rule: --8<---------------cut here---------------start------------->8--- (define-syntax-rule (custom-libc-operating-system exp ...) "Like 'operating-system' but graft 'libc' with the a custom 'libc' package." (map-type replace-libc (@ (guix packages) ) (operating-system exp ...))) --8<---------------cut here---------------end--------------->8--- Which, if `replace-libc` grafts your custom libc using `package-input-rewriting`, would allow you to define a system like so: --8<---------------cut here---------------start------------->8--- (custom-libc-operating-system ...) --8<---------------cut here---------------end--------------->8--- Is Guix interested in having such a procedure? If not, I will submit it to Nonguix but I believe it would be a welcomed addition for Guix users. In the case that the Guix community is interested where should it be placed? I was thinking `guix/records.scm`, what do you think? The complete implementation can be found in my personal channel [2]. [1] https://gitlab.com/nonguix/nonguix [2] https://codeberg.org/shepherd/omega/src/commit/0d45b10f709cfbc70c3ec756933f09a296a9d6e3/pastor/utils/gpu-specification.scm#L51 Have a nice day! Sergio.