From dedb512f8f2282f7de3d5b56e7551e486e37840c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 16 Oct 2017 09:57:44 +0200 Subject: gexp: Add 'file-union'. * gnu/services.scm (file-union): Move to... * guix/gexp.scm (file-union): ... here. New procedure. * doc/guix.texi (G-Expressions): Document it. --- gnu/services.scm | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'gnu/services.scm') diff --git a/gnu/services.scm b/gnu/services.scm index 0bd3620852..bc866eafe3 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -97,7 +97,6 @@ %activation-service etc-service - file-union ;XXX: for lack of a better place directory-union)) ;;; Comment: @@ -388,25 +387,6 @@ boot." (list (service-extension boot-service-type cleanup-gexp))))) -(define* (file-union name files) ;FIXME: Factorize. - "Return a that builds a directory containing all of FILES. -Each item in FILES must be a list where the first element is the file name to -use in the new directory, and the second element is a gexp denoting the target -file." - (computed-file name - #~(begin - (mkdir #$output) - (chdir #$output) - #$@(map (match-lambda - ((target source) - #~(begin - ;; Stat the source to abort early if it - ;; does not exist. - (stat #$source) - - (symlink #$source #$target)))) - files)))) - (define (directory-union name things) "Return a directory that is the union of THINGS." (match things -- cgit v1.2.3