From c10851cf912d60d18d79badbbefe85c2d21081f9 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 24 Oct 2017 12:17:32 -0400 Subject: build-system/go: Parameterize installing the source code. * guix/build-system/go.scm (go-build): Add install-source? key. * guix/build/go-build-system.scm (install-source): Check if install-source? is true. --- guix/build/go-build-system.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'guix/build') diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index d8ccb98138..72af6ce7b6 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -126,13 +126,14 @@ (define* (unpack #:key source import-path unpack-path #:allow-other-keys) (zero? (system* "unzip" "-d" dest source)) (zero? (system* "tar" "-C" dest "-xvf" source)))))) -(define* (install-source #:key outputs #:allow-other-keys) +(define* (install-source #:key install-source? outputs #:allow-other-keys) "Install the source code to the output directory." (let* ((out (assoc-ref outputs "out")) (source "src") (dest (string-append out "/" source))) - (copy-recursively source dest #:keep-mtime? #t) - #t)) + (if install-source? + (copy-recursively source dest #:keep-mtime? #t) + #t))) (define (go-package? name) (string-prefix? "go-" name)) -- cgit v1.2.3