summaryrefslogtreecommitdiffstats
path: root/guix/jd/utils.scm
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2024-04-26 18:21:56 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2024-04-27 18:20:11 +0200
commit73af89d935df5a8166114c9257f9f247f29850bf (patch)
treec8addfe86575b030ca5a61644dbc77adb8f63c43 /guix/jd/utils.scm
parent9ca1ae3ceca5944765af94514e75a96195de5716 (diff)
downloaddotfiles-73af89d935df5a8166114c9257f9f247f29850bf.tar.gz
dotfiles-73af89d935df5a8166114c9257f9f247f29850bf.zip
Migrate from stumpwm to sway and from manifests to home-services.
Diffstat (limited to 'guix/jd/utils.scm')
-rw-r--r--guix/jd/utils.scm21
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."