guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cookbook recipe from "The Repository as a Channel" section does not


From: Nigko Yerden
Subject: Re: Cookbook recipe from "The Repository as a Channel" section does not work for Guix with properly configured GUILE_LOAD_PATH
Date: Thu, 15 Aug 2024 21:34:32 +0500
User-agent: Mozilla Thunderbird

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]