website: package-channel: Fix `vcs-file?' in channel section.

Building the package after the changes in section "Level 2: The repository as
a channel" would create an empty recursive copy since source files would be
above the current source directory (now `.guix/modules') passed to
`git-predicate', thus the resulting predicate would always be false for them.

Fixed by making the argument of `git-predicate' be the root of the Git
checkout again.

Also fix minor error in `package-with-configure-flags' documentation.

* website/drafts/package-channel.md: Fix `vcs-file?' in channel section.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Ivan Vilata-i-Balaguer 2023-09-22 20:46:56 +02:00 committed by Ludovic Courtès
parent f258d14a40
commit 9c5b07cde7
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 6 additions and 1 deletions

View File

@ -252,6 +252,11 @@ havent changed):
#:use-module (guix git-download) ;for git-predicate
…)
(define vcs-file?
;; Return true if the given file is under version control.
(or (git-predicate (dirname (dirname (current-source-directory))))
(const #t))) ;not in a Git checkout
(define-public guile
(package
(name "guile")
@ -365,7 +370,7 @@ transformation options. We can add them like so:
…)
(define (package-with-configure-flags p flags)
"Return P with FLAGS as addition 'configure' flags."
"Return P with FLAGS as additional 'configure' flags."
(package/inherit p
(arguments
(substitute-keyword-arguments (package-arguments p)