I'm aware it's a bit of a special use-case but I'm wondering whether it'd be possible to respect the channel directory (from .guix-channel) when looking for self-build.\? I've managed to get it somewhat working (by modifying guix/channels.scm when looking for the file, and when applying patches). It does cause some unnecessary loads of .guix-channel, and my guille knowledge hasn't progressed to the point that I could figure out how to structure it differently. There may also be some concern that this will fail too early for an invalid 'guix channel? Not sure.
Here's a patch (not possible to apply as-is, sorry, the hashes will be off) --- guix-channel/guix/channels.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guix-channel/guix/channels.scm b/guix-channel/guix/channels.scm index 34f63eb833..de9c239872 100644 --- a/guix-channel/guix/channels.scm +++ b/guix-channel/guix/channels.scm @@ -455,7 +455,10 @@ (define (dot-git? file stat) (when (guix-channel? channel) ;; Apply the relevant subset of PATCHES directly in CHECKOUT. This is ;; safe to do because 'switch-to-ref' eventually does a hard reset. - (apply-patches checkout commit patches)) + (apply-patches + (string-append checkout (channel-metadata-directory + (read-channel-metadata-from-source checkout))) + commit patches)) (let* ((name (url+commit->name (channel-url channel) commit)) (checkout (add-to-store store name #t "sha256" checkout @@ -717,7 +720,9 @@ (define name (symbol->string (channel-name (channel-instance-channel instance)))) (define source - (channel-instance-checkout instance)) + (string-append + (channel-instance-checkout instance) + (channel-metadata-directory (channel-instance-metadata instance)))) (define commit (channel-instance-commit instance)) -- 2.46.0