From 1a5f2a73056709dec4e6ee6759414826833350f6 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 28 Jun 2018 08:43:20 +0100 Subject: Support placing the pkg and src directories in a lib output --- guix/build/go-build-system.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index 022d4fe16b..4b026eebd6 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -130,7 +130,8 @@ unset. When SOURCE is a directory, copy it instead of unpacking." (define* (install-source #:key install-source? outputs #:allow-other-keys) "Install the source code to the output directory." - (let* ((out (assoc-ref outputs "out")) + (let* ((out (or (assoc-ref outputs "lib") + (assoc-ref outputs "out"))) (source "src") (dest (string-append out "/" source))) (when install-source? @@ -208,7 +209,9 @@ on $GOBIN in the build phase." ;; https://lists.gnu.org/archive/html/guix-devel/2018-11/msg00208.html). ;; Remove it? (when (file-exists? "pkg") - (copy-recursively "pkg" (string-append (assoc-ref outputs "out") "/pkg"))) + (copy-recursively "pkg" (string-append (or (assoc-ref outputs "lib") + (assoc-ref outputs "out")) + "/pkg"))) #t) (define* (remove-store-reference file file-name -- cgit v1.2.3