From 73af89d935df5a8166114c9257f9f247f29850bf Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 26 Apr 2024 18:21:56 +0200 Subject: Migrate from stumpwm to sway and from manifests to home-services. --- guix/jd/utils.scm | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'guix/jd/utils.scm') 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 @@ ;; This code is copied and modified from (gnu packages) module. -(define %jd-patch-path +(define (make-custom-load-path dir-path) (make-parameter (map (lambda (directory) - (let ((jd-patch-dir (string-append directory "/jd/packages/patches"))) - (if (and (file-exists? jd-patch-dir) - (file-is-directory? jd-patch-dir)) - jd-patch-dir + (let ((custom-dir (string-append directory dir-path))) + (if (and (file-exists? custom-dir) + (file-is-directory? custom-dir)) + custom-dir directory))) - %load-path))) + %load-path))) + +(define (make-custom-searcher load-path) + (lambda (file-name) + (or (search-path (load-path) file-name) + (raise (string-append file-name + ": not found"))))) + +(define %jd-patch-path (make-custom-load-path "/jd/packages/patches")) +(define %jd-dot-files-path (make-custom-load-path "/jd/home/services/dotfiles")) (define (jd-search-patch file-name) "Search the patch FILE-NAME. Raise an error if not found." -- cgit v1.2.3