diff options
author | Arun Isaac | 2021-12-31 12:54:53 +0530 |
---|---|---|
committer | Arun Isaac | 2021-12-31 12:54:53 +0530 |
commit | 24ffb3930ed0e75ee0f72d55a7e53253f3a58e8e (patch) | |
tree | 4ca7611fa45655963f79eafa68c419c844ca7522 | |
parent | 0eae38289f47dd2fe777e9688d5f770cefc7f404 (diff) | |
download | nsmc-24ffb3930ed0e75ee0f72d55a7e53253f3a58e8e.tar.gz nsmc-24ffb3930ed0e75ee0f72d55a7e53253f3a58e8e.tar.lz nsmc-24ffb3930ed0e75ee0f72d55a7e53253f3a58e8e.zip |
Use git-predicate in guix.scm.
* guix.scm: Do not import (ice-9 match), (ice-9 popen), (ice-9
rdelim), (srfi srfi-1), (srfi srfi-26) and (guix build utils).
(git-file?): Delete function.
(nsmc): Use git-predicate instead of git-file?
-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 |