20 lines
648 B
Scheme
20 lines
648 B
Scheme
(define-module (oms channel-file)
|
|
#:use-module (guix gexp)
|
|
#:use-module (guix utils)
|
|
#:export (channel-file))
|
|
|
|
(define (channel-path file)
|
|
(string-append (current-source-directory) "/../../files/" file))
|
|
|
|
(define-syntax channel-file
|
|
(lambda (s)
|
|
(syntax-case s ()
|
|
((channel-file file rest ...)
|
|
(string? (syntax->datum #'file))
|
|
(with-syntax ((file* (datum->syntax #'file (channel-path
|
|
(syntax->datum #'file)))))
|
|
#'(local-file file* rest ...)))
|
|
((channel-file file rest ...)
|
|
#'(local-file (channel-path file)
|
|
rest ...)))))
|