* Respect channel directory for 'guix channel
@ 2024-08-08 0:24 Kai Jellinghaus
0 siblings, 0 replies; only message in thread
From: Kai Jellinghaus @ 2024-08-08 0:24 UTC (permalink / raw)
To: guix-devel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-08 0:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08 0:24 Respect channel directory for 'guix channel Kai Jellinghaus
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.