summaryrefslogtreecommitdiff
path: root/gnu/packages/golang-build.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <[email protected]>2024-07-20 00:19:46 +0100
committerSharlatan Hellseher <[email protected]>2024-07-25 21:00:58 +0100
commit1bf612376574baa8771d6cc88285e30fa877aeaa (patch)
treeca623d46eb665282107a70d8c4c76d0332a3504f /gnu/packages/golang-build.scm
parent058e0cc75a2cb7dc81386b994084f162e75cb552 (diff)
gnu: go-github-com-google-go-cmp: Move to golang-build.
* gnu/packages/golang.scm (go-github-com-google-go-cmp): Move from here ... * gnu/packages/golang-build.scm: ... to here. Change-Id: I2577d39074676f1e8552c8817d6e6843f9dd0727
Diffstat (limited to 'gnu/packages/golang-build.scm')
-rw-r--r--gnu/packages/golang-build.scm42
1 files changed, 41 insertions, 1 deletions
diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm
index d2ee54f021..88665490bb 100644
--- a/gnu/packages/golang-build.scm
+++ b/gnu/packages/golang-build.scm
@@ -2,11 +2,11 @@
;;; Copyright © 2019 Brian Leung <[email protected]>
;;; Copyright © 2019, 2020 Leo Famulari <[email protected]>
;;; Copyright © 2020 Danny Milosavljevic <[email protected]>
-;;; Copyright © 2020, 2024 Efraim Flashner <[email protected]>
;;; Copyright © 2020 HiPhish <[email protected]>
;;; Copyright © 2020 Oleg Pykhalov <[email protected]>
;;; Copyright © 2020 Ryan Prior <[email protected]>
;;; Copyright © 2020 Vagrant Cascadian <[email protected]>
+;;; Copyright © 2020, 2023, 2024 Efraim Flashner <[email protected]>
;;; Copyright © 2021 Arun Isaac <[email protected]>
;;; Copyright © 2021 Ludovic Courtès <[email protected]>
;;; Copyright © 2021 Sarah Morgensen <[email protected]>
@@ -56,6 +56,46 @@
;;;
;;; Code:
+(define-public go-github-com-google-go-cmp
+ (package
+ (name "go-github-com-google-go-cmp")
+ (version "0.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/go-cmp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1n1j4hi50bl05pyys4i7y417k9g6k1blslj27z327qny7kkdl2ma"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/google/go-cmp/cmp"
+ #:unpack-path "github.com/google/go-cmp"
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? import-path inputs #:allow-other-keys)
+ (when tests?
+ ;; The tests fail when run with gccgo.
+ (let ((gccgo? (false-if-exception
+ (search-input-file inputs "/bin/gccgo"))))
+ (if gccgo?
+ (format #t "skipping tests with gccgo compiler~%")
+ ;; XXX: Workaround for go-build-system's lack of Go
+ ;; modules support.
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "go" "test" "-v" "./..."))))))))))
+ (synopsis "Determine equality of values in Go")
+ (home-page "https://github.com/google/go-cmp")
+ (description
+ "This package is intended to be a more powerful and safer
+alternative to @code{reflect.DeepEqual} for comparing whether two values are
+semantically equal.")
+ (license license:bsd-3)))
+
(define-public go-github-com-yuin-goldmark
(package
(name "go-github-com-yuin-goldmark")