[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26987: [PATCH 2/2] build: pull: Fix compilation list construction.
From: |
Mathieu Othacehe |
Subject: |
bug#26987: [PATCH 2/2] build: pull: Fix compilation list construction. |
Date: |
Fri, 19 May 2017 15:55:31 +0200 |
User-agent: |
mu4e 0.9.18; emacs 25.2.1 |
Hi Ludo,
It seems better but I can't get it to work neither :
> (find (match-lambda
> (('ssh _ ...) #t)
> (_ #f))
> - (source-module-closure file #:select? (const #t))))
> + (source-module-closure module #:select? (const #t)))))
^
we need a list here.
>
> (define (all-scheme-files directory)
> "Return a sorted list of Scheme files found in DIRECTORY."
>
> WDYT?
So with
--8<---------------cut here---------------start------------->8---
(define (depends-on-guile-ssh? file)
"Return true if FILE is a Scheme source file that depends, directly or
indirectly, on Guile-SSH."
(let ((module (call-with-input-file file
(lambda (port)
(match (read port)
(('define-module name _ ...)
name))))))
(find (match-lambda
(('ssh _ ...) #t)
(_ #f))
(source-module-closure (list module) #:select? (const #t)))))
--8<---------------cut here---------------end--------------->8---
I get,
--8<---------------cut here---------------start------------->8---
((@@ (guix build pull) depends-on-guile-ssh?) "/home/mathieu/guix/guix/ssh.scm")
ERROR: In procedure open-file:
ERROR: Wrong type (expecting string): #f
--8<---------------cut here---------------end--------------->8---
I'm having a hard time tring to understand ,trace output.
Mathieu