aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-06-28 08:43:20 +0100
committerChristopher Baines <mail@cbaines.net>2018-12-28 22:09:29 +0000
commit1a5f2a73056709dec4e6ee6759414826833350f6 (patch)
tree8a92907a7d35b5004488d8296880dbdcf706fc18
parente4231cfeeae16352e76ccdbeebe67e17da7262c4 (diff)
downloadguix-1a5f2a73056709dec4e6ee6759414826833350f6.tar
guix-1a5f2a73056709dec4e6ee6759414826833350f6.tar.gz
Support placing the pkg and src directories in a lib output
-rw-r--r--guix/build/go-build-system.scm7
1 files 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