Hello Attila Lendvai, Thank you very much for your hints and references! Indeed I was puzzled by weird behavior of 'current-filename'. I wrote another alternative using '(module-filename (current-module))' based on https://issues.guix.gnu.org/55464 See alt2 branch of [1].
This variant does not need wrapping directory for the package file, and has the same file structure as the main branch of [1]. The variable (define package-dir (dirname (canonicalize-path (search-path %load-path (module-filename (current-module)))))) is bounded to the current directory of 'test-repo-package.scm', so the 'source' field of the package is (local-file (string-append package-dir "/../..") "test-repo-checkout" #:recursive? #t #:select? vcs-file?)) It seems to work even without macro wrapper. Regards, Nigko [1] https://gitlab.com/anigko/test-channel.git