From: Nigko Yerden Date: Wed, 14 Aug 2024 17:06:49 +0200 Subject: [PATCH] doc: cookbook: Fix non-working recipe. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: * doc/guix-cookbook.texi (Software Development)[The Repository as a Channel]: Move package to its own directory. With Guix’ default GUILE_LOAD_PATH setting, `local-file' cannot correctly follow symlinks otherwise. Change-Id: I45d6878139e32f33b40465e272356c106a6d920a --- doc/guix-cookbook.texi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index da67921ad0..bcb1bf67fc 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -25,6 +25,7 @@ Copyright @copyright{} 2023-2024 Ludovic Courtès@* Copyright @copyright{} 2023 Thomas Ieong@* Copyright @copyright{} 2024 Florian Pelz@* +Copyright @copyright{} 2024 Nigko Yerden@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -4623,9 +4624,9 @@ The Repository as a Channel symlink for the sake of @command{guix shell}: @lisp -mkdir -p .guix/modules -mv guix.scm .guix/modules/guile-package.scm -ln -s .guix/modules/guile-package.scm guix.scm +mkdir -p .guix/modules/guile +mv guix.scm .guix/modules/guile/package.scm +ln -s .guix/modules/guile/package.scm guix.scm @end lisp To make it usable as part of a channel, we need to turn our @@ -4639,21 +4640,21 @@ The Repository as a Channel looks like this (not repeating things that haven't changed): @lisp -(define-module (guile-package) +(define-module (guile package) #:use-module (guix) #:use-module (guix git-download) ;for ‘git-predicate’ @dots{}) (define vcs-file? ;; Return true if the given file is under version control. - (or (git-predicate (dirname (dirname (current-source-directory)))) + (or (git-predicate (dirname (dirname (dirname (current-source-directory))))) (const #t))) ;not in a Git checkout (define-public guile (package (name "guile") (version "3.0.99-git") ;funky version number - (source (local-file "../.." "guile-checkout" + (source (local-file "../../.." "guile-checkout" #:recursive? #t #:select? vcs-file?)) @dots{})) base-commit: 174ecf5b1077d29498d9de22e27b13047f314feb -- 2.45.2