guix-devel
[Top][All Lists]
Advanced

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

Subdirectories in GUIX_PACKAGE_PATH


From: Christopher Baines
Subject: Subdirectories in GUIX_PACKAGE_PATH
Date: Fri, 23 Jun 2017 21:20:58 +0100

Hey,

Recently I had problems with the way GUIX_PACKAGE_PATH was working with
govuk-guix [1]. Currently, I'm using a separate directory for the
GUIX_PACKAGE_PATH that contains symlinks to a subset of the Guile
modules necessary for the packages in the repository.

I think support (whether intentional or otherwise) for this approach was
removed in [2]. While I could get it working again by just symlinking
all the files individually, it reminded me that there was the
possibility of improving GUIX_PACKAGE_PATH.

The reason I'm separating the package search path from the complete
set of modules is linked to the current way I've approached making
govuk-guix work reproducibly in terms of the version of Guix itself.

The govuk-guix repository includes a Guix package definition that
points at a specific revision of Guix. The guix environment command is
used to setup this Guix package, at which point the behaviour should
be independent of the Guix on the system that was used at first. The
script to do this is here [3].

Guix itself does something similar for the package definitions, as it
only looks in (gnu packages). I'm unsure what the motivation is for
this, maybe its faster just to check modules that are known to contain
packages.

Anyway, given the above, I think it would be useful to support
specifying subdirectories when using GUIX_PACKAGE_PATH. Any thoughts?

I've attached a rough patch that sets this up, such that you can do
something like:

  export GUIX_PACKAGE_PATH="/tmp/foo^bar/baz:/tmp/cats"

Where ^ acts as the separator, and bar/baz is the subdirectory.

Thanks,

Chris

1: https://github.com/alphagov/govuk-guix
2:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=d27cc3bfaafe6b5b0831e88afb1c46311d382a0b
3: https://github.com/alphagov/govuk-guix/blob/master/guix-pre-inst-env

Attachment: 0001-gnu-packages-Support-subdirectories-in-GUIX_PACKAGE_.patch
Description: Text Data

Attachment: pgpE2itIxdNE2.pgp
Description: OpenPGP digital signature


reply via email to

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