summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index d859feadf62..db6a6c21ae3 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -164,6 +164,12 @@ flags."
164 %default-package-module-path 164 %default-package-module-path
165 channels-scm)))) 165 channels-scm))))
166 166
167(define (strip-trailing-slash s)
168 ;; Strip the trailing slash of a string, if present.
169 (if (string-suffix? "/" s)
170 (string-drop-right s 1)
171 s))
172
167(define %patch-path 173(define %patch-path
168 ;; Define it after '%package-module-path' so that '%load-path' contains user 174 ;; Define it after '%package-module-path' so that '%load-path' contains user
169 ;; directories, allowing patches in $GUIX_PACKAGE_PATH to be found. 175 ;; directories, allowing patches in $GUIX_PACKAGE_PATH to be found.
@@ -172,7 +178,7 @@ flags."
172 (if (string=? directory %distro-root-directory) 178 (if (string=? directory %distro-root-directory)
173 (string-append directory "/gnu/packages/patches") 179 (string-append directory "/gnu/packages/patches")
174 directory)) 180 directory))
175 %load-path))) 181 (map strip-trailing-slash %load-path))))
176 182
177;; This procedure is used by Emacs-Guix up to 0.5.1.1, so keep it for now. 183;; This procedure is used by Emacs-Guix up to 0.5.1.1, so keep it for now.
178;; See <https://github.com/alezost/guix.el/issues/30>. 184;; See <https://github.com/alezost/guix.el/issues/30>.