From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id yDnSA2U2Hma5OAAA62LTzQ:P1 (envelope-from ) for ; Tue, 16 Apr 2024 10:27:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id yDnSA2U2Hma5OAAA62LTzQ (envelope-from ) for ; Tue, 16 Apr 2024 10:27:17 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713256037; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=FitkuG7aff+6jKsG1kXsCwTwrzg46NC9dmW/mOqxWEs=; b=BTraVeYc71X5Oma6M8k4/EEo1T4QsuT29CdTOpTS3bg49gLnWfp83h2ougVAZp0g+9jHUo 9xMwaHLsb9PmDWrtI9urpaZaiuGmOGfhfnqEe4uhcjRGziy4MLUvgamk8AAKxxguQENtLc WYmSFSfRbmta6ku9b8syO3oPoHGyaMqYSYBWpQ09Y5T31sRUpMEyj5/oHoSQyZjJ3Cawyj rJw/g3XEZI5GzJBSJ/MVGhqrfBTROkSw6UFgplMKS5i3MLeUziW+EYTcvk+cKd/V5NME8y b0lHMXyCmkD2in6uFDrg4vh1wBuTMthtGRRDWHxlRQT+SpEWxeYLEd9tx3dkIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713256037; a=rsa-sha256; cv=none; b=Ujv34V5K+x3JaYEwF4IkEM7VQlEroomuRi4tHo205CGIxMHsJEwp5Z5HnPR8b3eWolOK++ GZafN6FcPFaJpcgtg9xb98tGlXuaM79NMu+x3JSztyEn7YpUXsXdetjMFHQACyuviGBsAt e/jLEviKvru7GTjN+OCpI7gssSOmXAzP7wM9DfpTmHm4ERb8ptcvA+ZMGYtFL3poOKWwDd HdNw6cCodo2dyctfSmHMIS5h2Szwn8kMnkcEcqHerM96MvWSd3ag13eeuai3yUV7F55csz WQojy52kWs8jbr6fgqKxOv9sNtGCroDV1Iub23F7Gv/lU2i8vtQTnJlv9V5IcQ== 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 914B49532 for ; Tue, 16 Apr 2024 10:27:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwe9D-0005Up-Tv; Tue, 16 Apr 2024 04:26:36 -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 1rwe99-0005Ua-JU for guix-devel@gnu.org; Tue, 16 Apr 2024 04:26:33 -0400 Received: from 3.mo584.mail-out.ovh.net ([46.105.57.129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwe94-0007MZ-NY for guix-devel@gnu.org; Tue, 16 Apr 2024 04:26:29 -0400 Received: from director8.ghost.mail-out.ovh.net (unknown [10.108.25.134]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 4VJcZQ3DxMz1PQ7 for ; Tue, 16 Apr 2024 08:26:22 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-rlqcv (unknown [10.111.174.111]) by director8.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 272581FEBA; Tue, 16 Apr 2024 08:26:21 +0000 (UTC) Received: from ngraves.fr ([37.59.142.96]) by ghost-submission-6684bf9d7b-rlqcv with ESMTPSA id 6HFYLS02HmZeTwAA7mjXhQ (envelope-from ); Tue, 16 Apr 2024 08:26:21 +0000 X-OVh-ClientIp: 81.67.146.208 To: spacecadet , guix-devel@gnu.org Subject: Re: Functional package interface In-Reply-To: <99e2b407-009d-518a-3c50-98571e3a7a0b@purge.sh> References: <0076d418-547a-1de2-6977-afe10d1a4222@purge.sh> <871q76pb26.fsf@ngraves.fr> <99e2b407-009d-518a-3c50-98571e3a7a0b@purge.sh> Date: Tue, 16 Apr 2024 10:26:20 +0200 Message-ID: <87le5dogr7.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 3904057928132387381 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudejgedgtdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepveelieeihfeugfegffekvdefveefleefgfduffeghfffjeegudeuvdegvdevhfdunecuffhomhgrihhnpehgnhhurdhorhhgpdhsrhdrhhhtnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrdelieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepghhuihigqdguvghvvghlsehgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeegpdhmohguvgepshhmthhpohhuth Received-SPF: pass client-ip=46.105.57.129; envelope-from=ngraves@ngraves.fr; helo=3.mo584.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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: , Reply-to: Nicolas Graves From: Nicolas Graves via "Development of GNU Guix and the GNU System distribution." Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.87 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -6.87 X-Migadu-Queue-Id: 914B49532 X-TUID: p334exw8vBm6 On 2024-04-16 01:17, spacecadet wrote: > Hi Nicolas > >> Isn't what you're trying to do already in Guix? Have a look at >> package-inputs-rewrite right there : >> https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html > > I want to have this but more powerful, I'd like to do something like > define an operating system with all instances of a package replaced. > Maybe something like that is already possible, but I haven't figured > out a way. > > As far as I know, with package-input-rewriting you would still have to > manually add it to all the services in your operating-system > definition. Or just use module-set! and manage the environment state > some other way. > > You also only have access to the input fields of packages, this is > something parameterize packages tackles too, being able to add inputs > that go anywhere in the package definition. Build phases for example, > to enable common compile options across multiple packages more easily. > >> I've also been working on general package propagation in RDE, it's still >> a work in progress, but it's not far from it : >> https://lists.sr.ht/~abcdw/rde-devel/patches/49956 > > I'll take a look. I knew there had to be more people working on this idea, > but it's not always easy to find these projects. In the code there, the function propagate-packages will indeed try and propagate every package through the graph node. Four tricky points though : - propagating some packages that are used in build-systems will trigger massive rebuilds (e.g. go, emacs, python, ocaml, texlive), you'll probably have to be smart about what you want to avoid to propagate, but it's great because guix can already hide a package to package-inputs-rewriting using (hidden-package {package-name}). There are some examples in the series. - some packages are present under different names (emacs has emacs-minimal, emacs, emacs-pgtk, emacs-wide-int...) and that is not handled by this function. - this has a cost. I haven't timed it yet, but the slowdown is noticeable, though still quite usable. - you of course have to get the packages into the function from a profile. Here's it's done in RDE's code, but that should be quite doable in Guix too. > > - sc -- Best regards, Nicolas Graves