Next: Módulos de paquetes en un subdirectorio, Previous: Channels with Substitutes, Up: Canales [Contents][Index]
Let’s say you have a bunch of custom package variants or personal packages that you think would make little sense to contribute to the Guix project, but would like to have these packages transparently available to you at the command line. By creating a channel, you can use and publish such a package collection. This involves the following steps:
mkdir my-channel cd my-channel git init
For example, Alice might want to provide a module called (alice
packages greetings)
that will provide her favorite “hello world”
implementations. To do that Alice will create a directory corresponding to
that module name.
mkdir -p alice/packages $EDITOR alice/packages/greetings.scm git add alice/packages/greetings.scm
You can name your package modules however you like; the main constraint to
keep in mind is to avoid name clashes with other package collections, which
is why our hypothetical Alice wisely chose the (alice packages
…)
name space.
Note that you can also place modules in a sub-directory of the repository; see Módulos de paquetes en un subdirectorio, for more info on that.
guix build
, which needs to be
told to look for modules in the Git checkout. For example, assuming
(alice packages greetings)
provides a package called
hi-from-alice
, Alice will run this command from the Git checkout:
guix build -L. hi-from-alice
... where -L.
adds the current directory to Guile’s load path
(see Load Paths in GNU Guile Reference Manual).
git commit
Como autora de un canal, considere adjuntar el material para la identificación a su canal de modo que las usuarias puedan verificarlo. See Verificación de canales, y Especificación de autorizaciones del canal, para obtener información sobre cómo hacerlo.
guix pull
(see Invocación de guix pull
):
$EDITOR ~/.config/guix/channels.scm guix pull
Guix will now behave as if the root directory of that channel’s Git
repository had been permanently added to the Guile load path. In this
example, (alice packages greetings)
will automatically be found by
the guix
command.
Voilà!
Aviso: Before you publish your channel, we would like to share a few words of caution:
- Antes de publicar un canal, por favor considere contribuir sus definiciones de paquete al propio Guix (see Contribuir). Guix como proyecto es abierto a software libre de todo tipo, y los paquetes en el propio Guix están disponibles para todas las usuarias de Guix y se benefician del proceso de gestión de calidad del proyecto.
- Package modules and package definitions are Scheme code that uses various programming interfaces (APIs). We, Guix developers, never change APIs gratuitously, but we do not commit to freezing APIs either. When you maintain package definitions outside Guix, we consider that the compatibility burden is on you.
- Corolario: si está usando un canal externo y el canal se rompe, por favor informe del problema a las autoras del canal, no al proyecto Guix.
¡Ha quedado advertida! Habiendo dicho esto, creemos que los canales externos son una forma práctica de ejercitar su libertad para aumentar la colección de paquetes de Guix y compartir su mejoras, que son pilares básicos del software libre. Por favor, envíenos un correo a guix-devel@gnu.org si quiere hablar sobre esto.
Next: Módulos de paquetes en un subdirectorio, Previous: Channels with Substitutes, Up: Canales [Contents][Index]