Nikita Karetnikov <nik...@karetnikov.org> skribis:

> AFAICT, the '#:phases' keyword can't be used because it requires
> '%standard-phases'.  There is also '#:builder', but I haven't found a
> way to use it.

So, #:phases is a keyword parameter recognized by ‘gnu-build-system’.
It lets you introduce, remove, or modify the normal build “phases” (see
gnu-build-system.scm).  This is useful when you just have to introduce
small changes, and when the package’s build system is similar to the GNU
build system—i.e., use something close to ./configure && make && make
install (info "(guix) Defining Packages").

In the case of Python packages, the right thing would be to define a
‘python-build-system’.  You’d add a (guix build-system python) module
that exports ‘python-build-system’; packages would use it as the value
of their ‘build-system’ field, which would mean that they get built,
installed, and tested via the ‘python setup.py install’ etc. commands.
This way, many/most Python packages would need little or no
customization once they use ‘python-build-system’.

So that’s the idea.  You could check
development/python-modules/generic/default.nix in Nixpkgs to see how
it’s done there.

I realize this is a bit more involved than “just” packaging the thing,
but it will be useful in the long run.

WDYT?

Ludo’.

Reply via email to