Hello Nigko. Your demonstration makes the guile channel work and is valuable already, but we disagree which path to take now.
current-source-directory looks as if it were written without consideration of symlinks; it resolves some and not others and none of this is documented or tested. My preferred option would be to fix it; I doubt peoples’ configuration or channels rely on not resolving symlinks. A bad option is to make `local-file' use some new `current-source-directory-always-resolving-symlinks'. Another bad option, to avoid any iota of ABI break in main guix, is to change the guile repo, change the guix-cookbook, change the blog entry from which the guix-cookbook section is derived. To add a note along the lines of “current-source-directory is a mess when using symlinks, local-file uses it, so please use no local-file and use current-module instead.” I’m not involved with guix core, but IMO it would be wrong. Rather please send your `absolute-dirname' work to guix-patches, which the core team would look at and have an opinion on. Preferrably simplifying `absolute-dirname' to not check (string-prefix? "/" file). Regards, Florian