diff options
author | Eric Bavier <bavier@member.fsf.org> | 2015-10-05 21:38:19 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2015-10-29 17:30:18 -0500 |
commit | c6e030b2e3965222e6bb27306311aaec9c7ae93c (patch) | |
tree | ea430d9be0f08078bf5f117bee9e84259cc9927a /guix/build/utils.scm | |
parent | 71eb843837c7ad2f8dfff8b07092e379ab547bb8 (diff) | |
download | gnu-guix-c6e030b2e3965222e6bb27306311aaec9c7ae93c.tar gnu-guix-c6e030b2e3965222e6bb27306311aaec9c7ae93c.tar.gz |
utils: Have search-path-as-list pattern search for directories.
* guix/build/utils.scm (search-path-as-list)[pattern]: Check requested file
type. Check pattern against directory names.
* guix/search-paths.scm (evaluate-search-paths)[pattern]: Remove symlink hack.
Diffstat (limited to 'guix/build/utils.scm')
-rw-r--r-- | guix/build/utils.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/guix/build/utils.scm b/guix/build/utils.scm index e3f9edc5b5..2988193fce 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -385,10 +385,13 @@ for under the directories designated by FILES. For example: (append-map (lambda (input) (append-map (lambda (file) (let ((file (string-append input "/" file))) - ;; XXX: By using 'find-files', we implicitly - ;; assume #:type 'regular. (if pattern - (find-files file pattern) + (find-files file (lambda (file stat) + (and stat + (eq? type (stat:type stat)) + ((file-name-predicate pattern) file stat))) + #:stat stat + #:directories? #t) (let ((stat (stat file #f))) (if (and stat (eq? type (stat:type stat))) (list file) |