all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: Subdirectories in GUIX_PACKAGE_PATH
Date: Mon, 26 Jun 2017 21:15:30 +0100	[thread overview]
Message-ID: <bfa193ce-b9b6-134a-a0e3-9ec47b8249a4@cbaines.net> (raw)
In-Reply-To: <87h8z3kn7j.fsf@elephly.net>


[-- Attachment #1.1: Type: text/plain, Size: 2260 bytes --]

On 26/06/17 12:22, Ricardo Wurmus wrote:
> 
> Christopher Baines <mail@cbaines.net> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 858 bytes --]

  reply	other threads:[~2017-06-26 20:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 20:20 Subdirectories in GUIX_PACKAGE_PATH Christopher Baines
2017-06-24 19:13 ` Alex Kost
2017-06-26 11:22 ` Ricardo Wurmus
2017-06-26 20:15   ` Christopher Baines [this message]
2017-06-30  9:35   ` Ludovic Courtès
2017-07-03 18:15     ` Alex Kost
2017-07-03 21:53       ` Ludovic Courtès
2017-07-05  7:04         ` Alex Kost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bfa193ce-b9b6-134a-a0e3-9ec47b8249a4@cbaines.net \
    --to=mail@cbaines.net \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.