diff options
Diffstat (limited to 'guix/jd/utils.scm')
-rw-r--r-- | guix/jd/utils.scm | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/guix/jd/utils.scm b/guix/jd/utils.scm index 5be7fa9..f4a35c1 100644 --- a/guix/jd/utils.scm +++ b/guix/jd/utils.scm | |||
@@ -3,15 +3,24 @@ | |||
3 | 3 | ||
4 | ;; This code is copied and modified from (gnu packages) module. | 4 | ;; This code is copied and modified from (gnu packages) module. |
5 | 5 | ||
6 | (define %jd-patch-path | 6 | (define (make-custom-load-path dir-path) |
7 | (make-parameter | 7 | (make-parameter |
8 | (map (lambda (directory) | 8 | (map (lambda (directory) |
9 | (let ((jd-patch-dir (string-append directory "/jd/packages/patches"))) | 9 | (let ((custom-dir (string-append directory dir-path))) |
10 | (if (and (file-exists? jd-patch-dir) | 10 | (if (and (file-exists? custom-dir) |
11 | (file-is-directory? jd-patch-dir)) | 11 | (file-is-directory? custom-dir)) |
12 | jd-patch-dir | 12 | custom-dir |
13 | directory))) | 13 | directory))) |
14 | %load-path))) | 14 | %load-path))) |
15 | |||
16 | (define (make-custom-searcher load-path) | ||
17 | (lambda (file-name) | ||
18 | (or (search-path (load-path) file-name) | ||
19 | (raise (string-append file-name | ||
20 | ": not found"))))) | ||
21 | |||
22 | (define %jd-patch-path (make-custom-load-path "/jd/packages/patches")) | ||
23 | (define %jd-dot-files-path (make-custom-load-path "/jd/home/services/dotfiles")) | ||
15 | 24 | ||
16 | (define (jd-search-patch file-name) | 25 | (define (jd-search-patch file-name) |
17 | "Search the patch FILE-NAME. Raise an error if not found." | 26 | "Search the patch FILE-NAME. Raise an error if not found." |