guix: fix git filter and source-dir
authorFlorian Dold <florian.dold@gmail.com>
Thu, 16 Aug 2018 23:34:12 +0000 (01:34 +0200)
committerFlorian Dold <florian.dold@gmail.com>
Thu, 16 Aug 2018 23:34:12 +0000 (01:34 +0200)
contrib/guix/gnu/packages/gnunet.scm

index 3a194375756905d66bc06fa1ebad3003df8cddd3..a91c69a11054e149cfcb935fd77f531bf9f74fdb 100644 (file)
@@ -245,8 +245,14 @@ supports HTTP, HTTPS and GnuTLS.")
                                   "See COPYING in the distribution."))
    (home-page "https://gnunet.org/gnurl")))
 
-(define %source-dir (dirname (current-filename)))
 
+(define (repeat f n)
+  (if (= n 1)
+      f
+      (lambda (x) (f ((repeat f (- n 1)) x)))))
+
+(define %source-dir ((repeat dirname 5) (current-filename)))
+  
 (define (git-output . args)
   "Execute 'git ARGS ...' command and return its output without trailing
 newspace."
@@ -260,7 +266,7 @@ newspace."
   (git-output "describe" "--tags"))
 
 (define (git-sources)
-  (local-file (dirname (dirname (dirname (dirname %source-dir))))
+  (local-file %source-dir
              #:recursive? #t
              #:select? (git-predicate %source-dir)))