guix-devel
[Top][All Lists]
Advanced

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

Re: Subdirectories in GUIX_PACKAGE_PATH


From: Christopher Baines
Subject: Re: Subdirectories in GUIX_PACKAGE_PATH
Date: Mon, 26 Jun 2017 21:15:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 26/06/17 12:22, Ricardo Wurmus wrote:
> 
> Christopher Baines <address@hidden> writes:
> 
>> 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].
> 
> Looks like this was removed in an attempt to improve performance over
> NFS.  The “scheme-files” procedure now includes a comment:
> 
>   ;; XXX: We don't recurse if we find a symlink.
> 
> Would it not be better to fix this instead of adding support for special
> syntax in GUIX_PACKAGE_PATH?

I won't comment on the general case, but in the specific case of trying
to limit the modules which Guix will scan for packages, using symlinks
seems like a unsatisfying approach to me. So, I'm more interested in
better approaches for providing packages to Guix, but specifying
subdirectories to search.

>> 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.
> 
> I sympathize with the desire to work around this problem, but for some
> reason I really don’t like adding special notation to path variables.
> (“texmf.cnf” of TeX Live has a similar feature where e.g. a trailing
> “//” indicates recursion.)

I only suggested this, as it was the simplest solution that came to mind
in terms of implementation.

Other ideas include:

A second search path environment variable, e.g.
GUIX_PACKAGE_PATH_SUB_DIRECTORIES . For a GUIX_PACKAGE_PATH like
"/tmp/repo1", this could then be set to "/tmp/repo1/mod1/mod2".


Files in the module directories to either have guix only use or ignore
directories, e.g.

/tmp/
  - repo1/
    - services/
      - .no-packages-here
    - packages/


Exported values in the modules themselves to have Guix ignore the
contents, e.g.

(define-public no-packages-here #t)


Plus probably more that other people can think of?

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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