From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EE66FJwwzF9dOgAA0tVLHw (envelope-from ) for ; Sun, 06 Dec 2020 01:15:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WAOeEJwwzF/McQAAB5/wlQ (envelope-from ) for ; Sun, 06 Dec 2020 01:15:08 +0000 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 1C7A79402A2 for ; Sun, 6 Dec 2020 01:15:07 +0000 (UTC) Received: from localhost ([::1]:35458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klidm-0006qv-RF for larch@yhetil.org; Sat, 05 Dec 2020 20:15:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klidW-0006qi-I3 for guix-devel@gnu.org; Sat, 05 Dec 2020 20:14:50 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klidU-0001NC-Bp; Sat, 05 Dec 2020 20:14:50 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1607217283; cv=none; d=zohomail.com; s=zohoarc; b=Tpmx2Q8kXCA9QYmQqpvC7efo7x/wHvtsIXLEE+NenH8R/VPGEYtzmc9QdI+RFurjbyNLs5ToCzuK27vCckMj2WdsIhxTFD3+P7+BVjDLpriED65ma1b4h5FCyO8totoYM7QozYgLVp7x0AEe543FPQ8AkMoCt8wmht4SSLvs7Q8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607217283; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=avRZPgpte+U5Ui5OWpBsif7wcjtXOZLYCOziWQdEuTw=; b=RogqwQcLaUfVlIsMmxSIpD0jvn0lGCOoDkJDomiPoSIkYd9Gu3haQAklz5lUwl6V6yATCaTN9tO76Vj7Htoj8KIaHP6ErhKnSxZC2BZcSl9iAto5VJvu0+HaJYbqS5DACbPhHCpHbz8VZzk11NkHNtxpVad5GWHziIpWkfS3/SQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1607217283; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=avRZPgpte+U5Ui5OWpBsif7wcjtXOZLYCOziWQdEuTw=; b=cfPtKQjmtg2B7FAiW6LVfTLGzkwuv25UBS6dX8oEMoq9Ol0ty8tcH3gQshQDkth5 U6eCwMAhO4faw7O4QufwyhEXFVfakdnrimOpsuUHO987aBMpoXa5KuTNm2juAZjwwE+ NYRYrY9QfAgpoArS41klsUFmvC0Xni5Ut9qwFsGY= Received: from localhost (p4fd5a92f.dip0.t-ipconnect.de [79.213.169.47]) by mx.zohomail.com with SMTPS id 1607217280799923.198622644289; Sat, 5 Dec 2020 17:14:40 -0800 (PST) References: <87o8tulhci.fsf@elephly.net> <871rpxu2fb.fsf@gnu.org> <87tuuayplb.fsf@elephly.net> <87ft5spvhn.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Extending Guix without using the Guile load path In-reply-to: <87ft5spvhn.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sun, 06 Dec 2020 02:14:37 +0100 Message-ID: <878sab7n2a.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.70 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=elephly.net header.s=zoho header.b=cfPtKQjm; arc=reject (signature check failed: fail, {[1] = sig:zohomail.com:reject}); dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 1C7A79402A2 X-Spam-Score: 0.70 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: gIocNbkOPL/n Ludovic Court=C3=A8s writes: > What if an extension could instead be a package installed next to Guix > and its channels in ~/.config/guix/current, and we use > =E2=80=98package-path-entries=E2=80=99 as is done in (gnu packages) to au= gment > =E2=80=98%load-path=E2=80=99 and =E2=80=98%load-compiled-path=E2=80=99? I=E2=80=99m not sure if that would complicate installation too much. Insta= lling a package in the =E2=80=9Cguix pull=E2=80=9D profile suggests to me that it= is installed when =E2=80=9Cguix pull=E2=80=9D is run, and not by =E2=80=9Cguix package -p ~/.config/guix/current -i my-extension=E2=80=9D. I suppose it would help with propagated inputs, because they would also end up in the =E2=80=9Cguix pull=E2=80=9D profile, but perhaps that=E2=80= =99s not really desirable as an extension probably should not be able to accidentally break Guix just because it uses a different version of a Guile library that Guix also happens to use. Keeping the directory tree of the extension separate from the =E2=80=9Cguix pull=E2=80=9D profile would ensure that the core features of Guix keep work= ing, no matter how badly broken an extension might be. So I=E2=80=99m thinking that we should instead define GUIX_EXTENSIONS_PATH = as a list of directories containing merely the *entry points* for additional Guix commands. For example, the GWL would provide a script =E2=80=9Cworkfl= ow=E2=80=9D in a directory $prefix/share/guix/extensions/ (or whatever), and that script is a wrapped executable that sets its own %load-path and %load-compiled-path as needed (and determined at build time). All Guix does is search for matching executables on GUIX_EXTENSIONS_PATH when asked for an unknown command. This is disappointingly simple, but I think it=E2=80=99s one of the safest things to do. An incidental side effect of doing things this way is that extensions could, in theory, be written in languages other than Guile (stretching the meaning of =E2=80=9Cextension=E2=80=9D to its limits). --=20 Ricardo