@@ -20,7 +20,7 @@
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.com>
;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
-;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 raingloom <raingloom@riseup.net>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
@@ -5945,9 +5945,35 @@ gotest-tools.")))
(arguments
`(#:tests? #f ; Test failure concerning message formatting (FIXME)
#:import-path "gotest.tools/assert"
- #:unpack-path "gotest.tools"))
- ;(propagated-inputs
- ; `(("go-gotest-tools-internal-format" ,go-gotest-tools-internal-format)))
+ #:unpack-path "gotest.tools"
+ #:modules ((ice-9 match)
+ (srfi srfi-26)
+ ,@%go-build-system-modules)
+ #:phases
+ (modify-phases (@ (guix build go-build-system) %standard-phases)
+ (add-before 'install 'install-internal-inputs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; The Go compiler does not permit importing libraries with
+ ;; "internal" in the path from anywhere except below the
+ ;; package that uses them. Thus, install these inputs
+ ;; alongside this package.
+ (union-build
+ out
+ (match (filter (lambda (input)
+ (string-prefix? "go-gotest-tools-internal"
+ (car input)))
+ inputs)
+ (((names . directories) ...) directories))
+ #:create-all-directories? #t
+ #:log-port (%make-void-port "w"))))))))
+ (inputs
+ `(("go-gotest-tools-internal-format"
+ ,go-gotest-tools-internal-format)
+ ("go-gotest-tools-internal-difflib"
+ ,go-gotest-tools-internal-difflib)
+ ("go-gotest-tools-internal-source"
+ ,go-gotest-tools-internal-source)))
(native-inputs
`(("go-github-com-pkg-errors" ,go-github-com-pkg-errors)
("go-github-com-google-go-cmp-cmp"
@@ -5985,17 +6011,6 @@ test when a comparison fails.")
,go-github-com-jonboulle-clockwork)
("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
("go-gotest-tools-assert" ,go-gotest-tools-assert)
- ("go-github-com-google-go-cmp-cmp"
- ,go-github-com-google-go-cmp-cmp)
- ;; TODO: This would be better as a propagated-input of
- ;; go-gotest-tools-assert, but that does not work for
- ;; some reason.
- ("go-gotest-tools-internal-format"
- ,go-gotest-tools-internal-format)
- ("go-gotest-tools-internal-difflib"
- ,go-gotest-tools-internal-difflib)
- ("go-gotest-tools-internal-source"
- ,go-gotest-tools-internal-source)
("go-github-com-google-go-cmp-cmp"
,go-github-com-google-go-cmp-cmp)))
(synopsis "Go test runner with output optimized for humans")