summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-06-28 08:43:20 +0100
committerChristopher Baines <christopher.baines@digital.cabinet-office.gov.uk>2019-02-24 20:34:02 +0000
commit34241838d68fe66d7efb773f09d5c22bf93dd677 (patch)
tree483baa7a94c5e66aea6492dc062470b2530477f0
parente44d13d506b38a1dd4ec42aa885f0a6cc60f87a9 (diff)
downloadgnu-guix-34241838d68fe66d7efb773f09d5c22bf93dd677.tar
gnu-guix-34241838d68fe66d7efb773f09d5c22bf93dd677.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