diff options
-rw-r--r-- | guix.scm | 27 |
1 files changed, 2 insertions, 25 deletions
@@ -3,13 +3,7 @@ ;;; ;;; $ guix environment -l guix.scm -(use-modules (ice-9 match) - (ice-9 popen) - (ice-9 rdelim) - (srfi srfi-1) - (srfi srfi-26) - (guix build utils) - (guix build-system cmake) +(use-modules (guix build-system cmake) (guix build-system guile) (guix gexp) (guix git-download) @@ -25,23 +19,6 @@ (define %source-dir (dirname (current-filename))) -(define git-file? - (let* ((pipe (with-directory-excursion %source-dir - (open-pipe* OPEN_READ "git" "ls-files"))) - (files (let loop ((lines '())) - (match (read-line pipe) - ((? eof-object?) - (reverse lines)) - (line - (loop (cons line lines)))))) - (status (close-pipe pipe))) - (lambda (file stat) - (match (stat:type stat) - ('directory #t) - ((or 'regular 'symlink) - (any (cut string-suffix? <> file) files)) - (_ #f))))) - ;; TODO: Contribute upstream to Guix and delete. (define sph-lib (package @@ -135,7 +112,7 @@ (home-page "https://git.systemreboot.net/nsmc") (source (local-file %source-dir #:recursive? #t - #:select? git-file?)) + #:select? (git-predicate %source-dir))) (build-system cmake-build-system) (arguments '(#:tests? #f ; no tests |