diff mbox series

[bug#50227,2/3] gnu: hyperledger-fabric: Do not assume GOPATH contains a single entry.

Message ID 20210827151330.13112-2-marius@gnu.org
State New
Headers show
Series go-build-system and GOPATH improvements | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Marius Bakke Aug. 27, 2021, 3:13 p.m. UTC
* gnu/packages/hyperledger.scm (hyperledger-fabric)[arguments]: Adjust for
multiple GOPATH entries.
---
 gnu/packages/hyperledger.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/hyperledger.scm b/gnu/packages/hyperledger.scm
index 82680cd5e4..5c36a81f44 100644
--- a/gnu/packages/hyperledger.scm
+++ b/gnu/packages/hyperledger.scm
@@ -77,11 +77,15 @@ 
        #:phases
        (modify-phases %standard-phases
          (replace 'build
-           (lambda _
+           (lambda* (#:key outputs #:allow-other-keys)
              ;; Only linux-amd64 and linux-ppc64le seem to be supported at the moment.
              (invoke "make"
                      "-j" (number->string (parallel-job-count))
                      "-C" "src/github.com/hyperledger/fabric"
+                     ;; The build system expects GOPATH to contain a single entry
+                     ;; and uses it to determine the installation directory.
+                     ;; Work around that.
+                     (string-append "GOTOOLS_BINDIR=" (assoc-ref outputs "out") "/bin")
                      "release/linux-amd64")))
          (add-after 'install 'install-commands
            (lambda* (#:key outputs #:allow-other-keys)