From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4Ho0Ef9bMGJCBAEAgWs5BA (envelope-from ) for ; Tue, 15 Mar 2022 10:27:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eNADDv9bMGIxMQEAauVa8A (envelope-from ) for ; Tue, 15 Mar 2022 10:27:27 +0100 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 7EE2814EF8 for ; Tue, 15 Mar 2022 10:27:26 +0100 (CET) Received: from localhost ([::1]:53406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nU3Sc-0006Tc-PH for larch@yhetil.org; Tue, 15 Mar 2022 05:27:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU32y-0001J1-DE for help-guix@gnu.org; Tue, 15 Mar 2022 05:00:52 -0400 Received: from [2001:470:142:3::e] (port=33032 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU32x-0007uF-Qy; Tue, 15 Mar 2022 05:00:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=JI5YmhT2I8yAANU/LxPIUlzxoU+9Ub2TQaiUkYlmhcc=; b=ZA1Ld29ZFbPupCgZz1I9 063Q+FCRS7tY51MPD313YaD6kTU/7i1G87aRXga7Xjx3Hy4kUFc1OkLrlt29jiAE8J7cbMhFZh1vC JfKnrvpskAZoDzXr838iPl9GKy4uKcVBDN59Ssg68ABC49eTLOUcBgef7+7ai3yf6X+7HRGDzyjEX eubfPsJ0ir41oRg8jy4yHznctxsaAl8TJU6pOpjCU68Y0XGl5juCGtiKrtiBFMqDG4tj7ndZE3HkT fWlE8C07zyLFRm2m5AFhWeQ/Ka72N7vj5PmGCFvsS/b8gHNtfoi0lItL7K3VCfaYLVmFr+0vnH9VV A4BY8njsLRUVhQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=38538 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU32u-0000TO-S3; Tue, 15 Mar 2022 05:00:51 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Dominic Martinez Subject: Re: Replacing a package system-wide References: <8735jjddob.fsf@dominicm.dev> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Vent=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 15 Mar 2022 10:00:46 +0100 In-Reply-To: <8735jjddob.fsf@dominicm.dev> (Dominic Martinez's message of "Tue, 15 Mar 2022 00:29:59 -0400") Message-ID: <87v8wfmvy9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647336447; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=JI5YmhT2I8yAANU/LxPIUlzxoU+9Ub2TQaiUkYlmhcc=; b=aSFK8R348F9+v25yq0yJJCKwjJJoQOv8IS5bkKKZZ2x6Tfq1u3EEc2/uonn79Y/We2CAej oc05hSntuYg4m4EAJ6Fkn2KBtKSrWcRqWCUFlI6YPE48Th6HrXjxbRp0zqzLgYHKboTuje Q39LzMvBpFcg0iDVf4+O0DqfwZKTRphfJe0FAfxFBeWkhUUGtqtXQrij4VlrHOOyAiIDuv FJyfGm+PBh+z2DB963nge1iFixOee+wsyorE6S42e4maGlzG34oFc6Ivv31zMP45c5lAan 7i+xf6SIdnRlOtfd8i65B8N3ncnSFJFajU+ses7G+HZLZu7xoBhum7RhcP522A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647336447; a=rsa-sha256; cv=none; b=KwHfQHG7gD3fhXUp2VcUcQwfH+i+R9j9HrmRDjREuizM06nA5KyMxnMgPCjXBKjug55xzG 6Yyer1/iU2obNOCBWmrXMOS83ae1imfW/atgUocl3IA2DQKdk1l8Aiu+BU/5KRS5YFHiz4 JWEhNmijXclgFEhl4pYdMjh4r3pAbvxIsrP6L/4//x6m/XB1NZ/Zuw2th11XnhMUhf3pOx elna7wM/duNxGltcbOR70Hq3RYuN88OkIqmKE2UC64gUEzmYXcH2NOn4TC0QTSF7xaip+t r3wdpY3giVVYHZForHfIL8axIBNf9gTRza8TU6x8B0pXpvgrP4VYKo9cMYFg/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=ZA1Ld29Z; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.37 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=ZA1Ld29Z; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7EE2814EF8 X-Spam-Score: -5.37 X-Migadu-Scanner: scn1.migadu.com X-TUID: 8s6BPrqPkw9S Hello, Dominic Martinez skribis: > One of the things I love about Guix is how easy it is to modify=20 > dependencies, a feature I use fairly often on individual packages=20 > or manifests. However, I'm struggling to get a similar effect=20 > system-wide. > > Grafts do exactly what I want, but since they are defined in the=20 > upstream package definition I can't set them for my personal=20 > system. Package rewriting lets me do this on a plain list of=20 > packages, but it's really difficult to do the same for services=20 > and not possible for guix shell/other command line usage. > > #+begin_src scheme > (operating-system > ;; Package rewriting makes this fairly straight-forward > (packages (fix-pkg %my-packages)) > > ;; But for packages deep in the dependency tree, you have to > ;; track down every service that has this package as a transient > ;; dependency and fix it. > (services > (service some-pkg-service-type > (some-pkg-service-configuration > (some-pkg-service (fix-pkg pkg)))) > > ;; Repeat ad-nauseum > )) > #+end_src This is correct: there=E2=80=99s currently no general package-rewriting mechanism for =E2=80=98operating-system=E2=80=99 as a whole. As a result, = you have to customize individual services like you show above. I agree it would be nice to offer a programatic way to replace packages, though I=E2=80=99m not sure what it should look like. Right now it=E2=80=99s tricky to peek at all the packages that services ref= er to, because in the end, these references are embedded in gexps that are =E2=80=9Clowered=E2=80=9D to files such as Shepherd service definitions. W= e would need a hook (at the gexp level? at a higher level?) to interpose on all package references that get lowered. Food for thought=E2=80=A6 Ludo=E2=80=99.