aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2017-08-29 07:41:30 +0100
committerChristopher Baines <mail@cbaines.net>2017-08-31 21:48:05 +0100
commita9d5e4bed1bd83136109ff3f8f5fd4881a52ab4b (patch)
treededa3ff3ba85a98b68af4e9d847df3fa2d33f9e9 /gnu/packages
parentfa9f5222a9e4d809e72537babea02c83086b6a90 (diff)
downloadpatches-a9d5e4bed1bd83136109ff3f8f5fd4881a52ab4b.tar
patches-a9d5e4bed1bd83136109ff3f8f5fd4881a52ab4b.tar.gz
gnu: Fix current-guix.
Without this change, I get errors like: ERROR: In procedure string-drop: ERROR: Value out of range 0 to 35: 51 * gnu/packages/package-management.scm (current-guix): Pass exactly the same path to git-predicate and local-file, to ensure that the select? function is compatible.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/package-management.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 67a956dea1..a6c97e618e 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -312,10 +312,11 @@ generated file."
#t)))
(define-public current-guix
- (let ((select? (delay (or (git-predicate
- (string-append (current-source-directory)
- "/../.."))
- source-file?))))
+ (let* ((repository-root (canonicalize-path
+ (string-append (current-source-directory)
+ "/../..")))
+ (select? (delay (or (git-predicate repository-root)
+ source-file?))))
(lambda ()
"Return a package representing Guix built from the current source tree.
This works by adding the current source tree to the store (after filtering it
@@ -323,7 +324,7 @@ out) and returning a package that uses that as its 'source'."
(package
(inherit guix)
(version (string-append (package-version guix) "+"))
- (source (local-file "../.." "guix-current"
+ (source (local-file repository-root "guix-current"
#:recursive? #t
#:select? (force select?)))))))