unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* API for rewriting package fields ?
@ 2024-04-26  5:25 Nicolas Graves via Development of GNU Guix and the GNU System distribution.
  2024-04-26 15:25 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Graves via Development of GNU Guix and the GNU System distribution. @ 2024-04-26  5:25 UTC (permalink / raw)
  To: guix-devel


Is there an interface to rewrite / update a field from a series of
packages easily?

What I get from the change in python-team last change for the
pyproject-build-system is that we need to add python-setuptools or
python-wheel to all packages that will complain about it, when trying to
build. The errors are very easy to diagnose (a string match in stderr: 
ModuleNotFoundError: No module named 'setuptools'
or
error: invalid command 'bdist_wheel'
is enough to know what's wrong).

The logical thing to do here IMO would be to have a script running,
reading stderr when it fails and programmatically replacing where it's
needed, since it's done for 2-3k packages basically.

I know some work has been done with the guix refresh command to rewrite
based on package field location, but I'm not sure it provides a
convenient-enough API to simply say in guile "add this package to
native-inputs of this package in place".

Would love some counselling here, thanks!

-- 
Best regards,
Nicolas Graves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: API for rewriting package fields ?
  2024-04-26  5:25 API for rewriting package fields ? Nicolas Graves via Development of GNU Guix and the GNU System distribution.
@ 2024-04-26 15:25 ` Ricardo Wurmus
  2024-04-26 16:57   ` Efraim Flashner
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2024-04-26 15:25 UTC (permalink / raw)
  To: Nicolas Graves via Development of GNU Guix and the GNU System distribution.
  Cc: Nicolas Graves

Nicolas Graves via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org> writes:

> Is there an interface to rewrite / update a field from a series of
> packages easily?

We have "update-package-inputs" in (guix upstream), which defines a
local procedure "update-field".  Perhaps you can use that?

What it cannot do yet is *create* a field, e.g. add a native-inputs
field to add an input when the package currently doesn't have a
native-inputs field.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: API for rewriting package fields ?
  2024-04-26 15:25 ` Ricardo Wurmus
@ 2024-04-26 16:57   ` Efraim Flashner
  0 siblings, 0 replies; 3+ messages in thread
From: Efraim Flashner @ 2024-04-26 16:57 UTC (permalink / raw)
  To: Ricardo Wurmus
  Cc: Nicolas Graves via Development of GNU Guix and the GNU System distribution.,
	Nicolas Graves

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

On Fri, Apr 26, 2024 at 05:25:47PM +0200, Ricardo Wurmus wrote:
> Nicolas Graves via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org> writes:
> 
> > Is there an interface to rewrite / update a field from a series of
> > packages easily?
> 
> We have "update-package-inputs" in (guix upstream), which defines a
> local procedure "update-field".  Perhaps you can use that?
> 
> What it cannot do yet is *create* a field, e.g. add a native-inputs
> field to add an input when the package currently doesn't have a
> native-inputs field.

There's also the package property updater-extra-{native-,propagated-,}inputs
to add a package even if it's not shown as required by the importer.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-26 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26  5:25 API for rewriting package fields ? Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-04-26 15:25 ` Ricardo Wurmus
2024-04-26 16:57   ` Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).