From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id WLCPJuEYIWaEOgEAe85BDQ:P1 (envelope-from ) for ; Thu, 18 Apr 2024 14:58:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id WLCPJuEYIWaEOgEAe85BDQ (envelope-from ) for ; Thu, 18 Apr 2024 14:58:09 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713445089; 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; bh=0m/oJkQGSeXTtGst36KiRsSyv/OTYpKZBVACfDmNsqE=; b=qt/ZPlU43Ds8Dy3ZmUqXjcFc7VsuWUObzAdI4I84iX4T5w198/cjDL/mDQnPw9aWYB8BYu pcUBk3qD6AzCzlREP/+Eykv/OXMPTMIHglFowIwNNVpfXINDVHmjwtpriswL+xi7LK4GFB ZEaOnh4YkOlOXBdXAllT8+KMRLjrRRDw/LaBZ4Jkn41kKgmu82YOy9ktbVvFkIGZXAKrGw YTWCOEsc1osYGqI2WW1N+WwwXsfo1p4Z6NL6ono7lHlnwtxMoDtDYu0pnDGJfFwGqG9St1 NRZN1I+jmznvkvE6bPmyd2akgC1NnJdQKcUTWfvrU98TKgHLeXrnxhwH9HBqlA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713445089; a=rsa-sha256; cv=none; b=fNQeQ+4M/sFu7FDaYWYXZKbm5Fh3WfhodaROrtA57XzYMxTRXkWs0WAGjeKqJ94sV5mdM9 yAbvGrgzZPYO/fDh45mQx0JCgj0oe7eWFmGd+7c3qIxl/atrxMG0U8Z3ZBlkNLKA+Hk96M NmJcnfhyH1j4iebrvokcHiNAmf/Bkg9EDQcwfnyBxt04eQeKZD4fep3U+KwMgqFZZPg/Rx JkFhkWzcFEUzp7OzAEqjK0ha3ddCUXeF/pBYHU/c+FenaskeXBc+kwY31rsx6XxSiclXBJ 6yUsM3b+4YimDrREC3jlANXkp4gGlt9hzoWLA3QxhTTtQybAiJ1vtmQshiWmiA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none 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 72A9E6D26F for ; Thu, 18 Apr 2024 14:58:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxRKa-0002my-RF; Thu, 18 Apr 2024 08:57: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 1rxRKY-0002ml-S4 for guix-devel@gnu.org; Thu, 18 Apr 2024 08:57:34 -0400 Received: from vmi993448.contaboserver.net ([194.163.141.236] helo=mutix.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxRKW-0001dr-Ki for guix-devel@gnu.org; Thu, 18 Apr 2024 08:57:34 -0400 Received: from [192.168.1.172] (host217-46-73-1.range217-46.btcentralplus.com [217.46.73.1]) (Authenticated sender: cdo) by mutix.org (Postfix) with ESMTPSA id 60697A63990; Thu, 18 Apr 2024 14:57:28 +0200 (CEST) Message-ID: <3bfefc2e-ff83-55b6-b149-b7d1638bd631@mutix.org> Date: Thu, 18 Apr 2024 13:57:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: Adding plumbing subcommand 'derivation'? Content-Language: en-US To: Ricardo Wurmus , Simon Tournier Cc: Leo Famulari , Guix Devel References: <87ttk6phac.fsf@gmail.com> <8734rpeenm.fsf@gmail.com> <87o7a73vyd.fsf@elephly.net> From: Christina O'Donnell In-Reply-To: <87o7a73vyd.fsf@elephly.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=194.163.141.236; envelope-from=cdo@mutix.org; helo=mutix.org X-Spam_score_int: -48 X-Spam_score: -4.9 X-Spam_bar: ---- X-Spam_report: (-4.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-3.029, 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-Spam-Score: -3.88 X-Spam-Score: -3.88 X-Migadu-Queue-Id: 72A9E6D26F X-Migadu-Scanner: mx13.migadu.com X-TUID: 2wsA8QicrS0R Hi, In the interest of throwing ideas out there, and with the caveat that this is rather uninformed: I think having  a derivation sub-command makes the most sense to me. E.g. `guix derivation show` for `guix drv-show` `guix derivation update` for `guix drv-drv` (or 'refresh' or 'fix') I have also been thinking that it'd potentially be useful to have something like: `guix derivation edit /gnu/store/...-xyz.drv` Which then produces a temp directory that you may edit with whatever tools you like, then on command checks for changed files, recompute hashes recursively, and puts the modified derivations and back into the store. I think this would be mainly be useful as a debugging tool or for changes that no longer build, for cases where the new `guix derivation update` wouldn't work. On the tangential subject of plumbing commands, I've also started to write a `guix store` command that simply exposes functions in (guix store) as a command line interface as a way of learning the internals of Guix. This would have sub-commands like: `guix store get-references` `guix store get-referrers` `guix store info` - dumps the `path-info` `guix store put xyz` - puts xyz into the store as a fixed derivation binary blob. I say this as a way of clarifying the design of `guix derivation`, not as extra stuff that needs go in at the same time. Most of these commands might be deemed unnecessary. Alternatively, as you say, Ricardo: `guix inspect get-references` `guix inspect get referrers` `guix inspect path-info` `guix inspect show-derivation` However, in that case, another home would need to be found for drv-drv at minimum since I wouldn't expect 'inspect' to modify anything. Kind regards, Christina On 18/04/2024 09:40, Ricardo Wurmus wrote: > Hi Simon, > >> So I propose to add the plumbing command ’derivation’. Any objection? > I think it's useful to have. To avoid proliferation of sub-commands, do > you think we could put this under "inspect", a generic sub-command for > all sorts of as yet to be invented introspection tools? >