aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-01-03 23:49:42 +0100
committerLudovic Courtès <ludo@gnu.org>2015-01-03 23:49:42 +0100
commitee06af5b4b314211f05c866f7226b8cb056a335b (patch)
treed27f2e71df66f9debb4c9c9f2e9d8621a3e32656 /gnu/packages.scm
parente13f715be0d609073974b1d464771638887a00c6 (diff)
downloadguix-ee06af5b4b314211f05c866f7226b8cb056a335b.tar
guix-ee06af5b4b314211f05c866f7226b8cb056a335b.tar.gz
gnu: Search for patches under $GUIX_PACKAGE_PATH.
Fixes <http://bugs.gnu.org/19364>. Reported by Tomáš Čech <sleep_walker@suse.cz> and Mark H Weaver <mhw@netris.org>. * gnu/packages.scm (%patch-path): Move after definition of %package-module-path'. Append "/gnu/packages/patches" only to %DISTRO-ROOT-DIRECTORY. * tests/guix-package.sh: Add 'emacs-foo-bar-patched' test.
Diffstat (limited to 'gnu/packages.scm')
-rw-r--r--gnu/packages.scm17
1 files changed, 11 insertions, 6 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index 6109d1f896..7f0b58b971 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;;
@@ -64,11 +64,6 @@
;; and an extra environment variable. One advantage of this setup is
;; that everything just works in an auto-compilation setting.
-(define %patch-path
- (make-parameter
- (map (cut string-append <> "/gnu/packages/patches")
- %load-path)))
-
(define %bootstrap-binaries-path
(make-parameter
(map (cut string-append <> "/gnu/packages/bootstrap")
@@ -104,6 +99,16 @@
(make-parameter
(append environment `((,%distro-root-directory . "gnu/packages"))))))
+(define %patch-path
+ ;; Define it after '%package-module-path' so that '%load-path' contains user
+ ;; directories, allowing patches in $GUIX_PACKAGE_PATH to be found.
+ (make-parameter
+ (map (lambda (directory)
+ (if (string=? directory %distro-root-directory)
+ (string-append directory "/gnu/packages/patches")
+ directory))
+ %load-path)))
+
(define* (scheme-files directory)
"Return the list of Scheme files found under DIRECTORY, recursively. The
returned list is sorted in alphabetical order."