From 2ffe34da1a81b955c481783626d5022916f54e04 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 19 Oct 2021 13:37:05 +0530 Subject: guix.scm: Use git-predicate from (guix git-download). * guix.scm: Do not import (srfi srfi-1), (srfi srfi-26), (ice-9 match), (ice-9 popen), (ice-9 rdelim) and (guix build utils). Import (guix git-download). (git-file?): Delete function. Use git-predicate from (guix git-download) instead of git-file?. --- guix.scm | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/guix.scm b/guix.scm index f824c14..ade30d8 100644 --- a/guix.scm +++ b/guix.scm @@ -27,49 +27,27 @@ ;;; Code: -(use-modules (srfi srfi-1) - (srfi srfi-26) - (ice-9 match) - (ice-9 popen) - (ice-9 rdelim) - (gnu packages autotools) +(use-modules (gnu packages autotools) (gnu packages bioinformatics) (gnu packages graphviz) (gnu packages guile) (gnu packages pkg-config) (gnu packages skribilo) (gnu packages texinfo) - (guix build utils) (guix build-system gnu) (guix gexp) + (guix git-download) (guix packages) ((guix licenses) #:prefix license:)) (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 "ccwl") (version "0.1.0") - (source (local-file %source-dir #:recursive? #t #:select? git-file?)) + (source (local-file %source-dir + #:recursive? #t + #:select? (git-predicate %source-dir))) (build-system gnu-build-system) (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings -- cgit v1.2.3