diff options
author | Arun Isaac | 2021-11-10 11:39:40 +0530 |
---|---|---|
committer | Arun Isaac | 2021-11-10 11:39:40 +0530 |
commit | 2ac16b43ad46d6e2c077497fb61b7acfcb88dea4 (patch) | |
tree | 3e17302570caf6f82a5c04e75a0379c6f9b4273e | |
parent | d28b823527b1eec1a99344da51abd139f97bfb64 (diff) | |
download | genenetwork3-2ac16b43ad46d6e2c077497fb61b7acfcb88dea4.tar.gz |
Use git-predicate in guix.scm.
* guix.scm: Do not import (srfi srfi-1), (srfi srfi-26), (ice-9 match), (ice-9
popen) and (ice-9 rdelim). Use git-predicate instead of git-file?.
(git-file?): Delete function.
-rw-r--r-- | guix.scm | 23 |
1 files changed, 1 insertions, 22 deletions
@@ -29,11 +29,6 @@ ;; env GUIX_PACKAGE_PATH=~/guix-bioinformatics/ guix environment -C -l guix.scm (use-modules - (srfi srfi-1) - (srfi srfi-26) - (ice-9 match) - (ice-9 popen) - (ice-9 rdelim) (gn packages gemma) (gn packages python) (gnu packages base) @@ -60,29 +55,13 @@ (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))))) (package (name "genenetwork3.git") (version "0.0.1") (source (local-file %source-dir #:recursive? #t - #:select? git-file?)) + #:select? (git-predicate %source-dir))) (propagated-inputs `(("coreutils" ,coreutils) ("gemma-wrapper" ,gemma-wrapper) ("gunicorn" ,gunicorn) |