guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding plumbing subcommand 'derivation'?


From: Christina O'Donnell
Subject: Re: Adding plumbing subcommand 'derivation'?
Date: Thu, 18 Apr 2024 13:57:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]