Hello Nigko and Attila. My current belief is that any `local-file'
referring to outside the .guix-channel directory cannot work in channels
in all situations. (Attila’s hashes files are inside guix-crypto’s
.guix-channel src directory. They are fine.)
At first glance, Guix is faulty and does not respect all symlinks
in `absolute-dirname'. The following diff should be applied to
guix.git, to resolve symlinks before computing dirname, not after:
diff --git a/guix/utils.scm b/guix/utils.scm
index d8ce6ed886..322c9457e4 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -1124,7 +1124,7 @@ (define absolute-dirname
;; needs to be canonicalized.
(if (string-prefix? "/" file)
(dirname file)
- (canonicalize-path (dirname file)))))))
+ (dirname (canonicalize-path file)))))))
(define-syntax current-source-directory
(lambda (s)
But this does not help with the cookbook’s guile channel nor Nigko’s
test-repo, even after repeatedly pulling a guix channel with this
change.
I might misunderstand .go compilation and whether macros are evaluated
at compile-time. But maybe the error is because `local-file' is
relative to the current-source-directory from which the .go file was
compiled. But the .go file was compiled from a directory union that
does not contain the source code, it only has the modules directory
listed in .guix-channel. Only when the pre-compiled .go is not used,
the source directory can be found. (Am I on the right track or
mistaken?)
/var/guix/profiles/per-user/florian/current-guix links to it. guix gc
--referrers and --derivers show what is built from what. Maybe I
misunderstand. Maybe the channel build system would need changes.
In particular,
$ guix build -S [email protected]
never works no matter the load path.
Regards,
Florian