aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-10-19 13:37:05 +0530
committerArun Isaac2021-10-19 13:37:05 +0530
commit2ffe34da1a81b955c481783626d5022916f54e04 (patch)
tree9554841cbf2dd69aa58a228c97a158cba744bd44
parent83802addde438eae2db409b89f570606e4e1ace6 (diff)
downloadccwl-2ffe34da1a81b955c481783626d5022916f54e04.tar.gz
ccwl-2ffe34da1a81b955c481783626d5022916f54e04.tar.lz
ccwl-2ffe34da1a81b955c481783626d5022916f54e04.zip
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?.
-rw-r--r--guix.scm32
1 files 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