From 21c6b40156db5a505215d4ce57fcab0ff6691300 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 17 Feb 2020 21:20:12 +0100 Subject: move unmaintained files to historic/ --- guix/taler-helpers.scm | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 guix/taler-helpers.scm (limited to 'guix/taler-helpers.scm') diff --git a/guix/taler-helpers.scm b/guix/taler-helpers.scm deleted file mode 100644 index 7f0b7c5..0000000 --- a/guix/taler-helpers.scm +++ /dev/null @@ -1,39 +0,0 @@ -(define-module (taler-helpers) - #:use-module (guix) - #:use-module (guix utils) - #:use-module (ice-9 textual-ports) - #:export (concat-local-files)) - -;;; -;;; Helpers -;;; - -(define (absolute-file-name file directory) - "Return the canonical absolute file name for FILE, which lives in the -vicinity of DIRECTORY." - (canonicalize-path - (cond ((string-prefix? "/" file) file) - ((not directory) file) - ((string-prefix? "/" directory) - (string-append directory "/" file)) - (else file)))) - -(define (%%concat-local-files srcdir outname files) - (define (slurp f) - (call-with-input-file (absolute-file-name f srcdir) get-string-all)) - (define (file-concat files) - (string-concatenate (map slurp files))) - (plain-file outname (file-concat files))) - - -(define-syntax concat-local-files - (lambda (s) - (syntax-case s () - ((_ outname files) - #'(%%concat-local-files (current-source-directory) outname files)) - ((_) - #'(syntax-error "missing arguments")) - (id - (identifier? #'id) - #'(syntax-error - "'concat-local-files' is a macro and cannot be used like this"))))) -- cgit v1.2.3