Sarthak Shah — June 9, 2023
Hello Guix!
I’m Sarthak and I’ll be working on implementing Parameterized Packages
for GNU Guix as a Google Summer of Code
intern under the guidance of Pjotr Prins and Gábor Boskovits.
One of the many advantages of free software is the
availability of compile-time options for almost all packages.
Thanks to its dedication to building all packages from source,
Guix is one of the few GNU/Linux distributions that can take advantage
of these compile-time features; in fact, many advanced users such as
those using Guix on High-Performance Computing Systems
and new ISAs like RISC-V have already been doing this
by utilizing a feature known as Package Transformations.
Parameterized Packages are a new type of package transformations
that will be able to tweak an even wider array of compile-time
options, such as removing unused dependencies or building a package
with support for just a specific locale. These will have a wide
variety of applications, ranging from High-Performance Computing to
Embedded Systems and could also help tackle a few of Guix’s issues
like large binary sizes and dense dependency graphs.
The syntax for parameterized packages is still under heavy
deliberation, however the final syntax will have the following
features:
- Maintainers will be able to specify what combinations of
parameters a package supports, along with a default configuration
of parameters for a given package. - Users will be able to pass parameters they want enabled or disabled
through--with-parameters
which will then get validated against the
valid combinations specified by maintainers before being run - For a given package and a given set of parameters, only those in
the package’s parameter specification will be used - Users will be able to specify a global parameter transform that
will apply to all packages. Packages will be built with the
default config