diff options
author | Leo Nikkilä <hello@lnikki.la> | 2024-08-24 16:25:05 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-08-25 20:46:47 +0100 |
commit | 90efc854994c0d9d0dc1123350061060614b4d7c (patch) | |
tree | 2c21d0fabfdb1465acc455950815cf8db64577ba /gnu | |
parent | eadbf482b74b3c0da9415c7216ab35ceb81e565a (diff) | |
download | guix-90efc854994c0d9d0dc1123350061060614b4d7c.tar guix-90efc854994c0d9d0dc1123350061060614b4d7c.tar.gz |
gnu: Add go-go-mongodb-org-mongo-driver.
* gnu/packages/golang-xyz.scm (go-go-mongodb-org-mongo-driver): New variable.
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Change-Id: Ib7bc1252593c91d33cb75436cdc9e803e11977af
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/golang-xyz.scm | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 040b1787b4..987cdff495 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -6766,6 +6766,85 @@ also provides V-style logging controlled by the @code{-v} and (list #:import-path "k8s.io/klog/v2")))) +(define-public go-go-mongodb-org-mongo-driver + (package + (name "go-go-mongodb-org-mongo-driver") + (version "1.16.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mongodb/mongo-go-driver") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "160hwrk8y8h3nl9sh5v6pxnlyw1ywbssjgzb72lj0x68akgl8gff")) + (snippet + #~(begin (use-modules (guix build utils)) + (delete-file-recursively "vendor"))))) + (build-system go-build-system) + (arguments + (list + #:import-path "go.mongodb.org/mongo-driver" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-examples-and-benchmarks + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (for-each delete-file-recursively + (list "benchmark" + "examples" + "cmd/godriver-benchmark"))))) + (add-before 'check 'disable-failing-tests + (lambda* (#:key tests? unpack-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" unpack-path) + (substitute* (find-files "." "\\_test.go$") + ;; Some tests require running database and available network connection. + (("TestAggregate") "OffTestAggregate") + (("TestPollSRVRecords") "OffTestPollSRVRecords") + (("TestPollSRVRecordsServiceName") + "OffTestPollSRVRecordsServiceName") + (("TestPollingSRVRecordsLoadBalanced") + "OffTestPollingSRVRecordsLoadBalanced") + (("TestPollingSRVRecordsSpec") + "OffTestPollingSRVRecordsSpec") + (("TestServerHeartbeatOffTimeout") + "OffTestServerHeartbeatTimeout") + (("TestServerHeartbeatTimeout") + "OffTestServerHeartbeatTimeout") + (("TestTimeCodec") "OffTestTimeCodec") + (("TestTopologyConstructionLogging") + "OffTestTopologyConstructionLogging") + (("TestURIOptionsSpec") "OffTestURIOptionsSpec"))))) + ;; XXX: Workaround for go-build-system's lack of Go modules support. + (delete 'build) + (replace 'check + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" import-path) + (for-each + (lambda (package) + (invoke "go" "test" (string-append "./" package "/..."))) + (list "bson" "event" "internal" "tag" "x"))))))))) + (native-inputs + (list go-github-com-aws-aws-lambda-go)) + (propagated-inputs + (list go-github-com-davecgh-go-spew + go-github-com-golang-snappy + go-github-com-google-go-cmp + go-github-com-klauspost-compress + go-github-com-montanaflynn-stats + go-github-com-xdg-go-scram + go-github-com-xdg-go-stringprep + go-github-com-youmark-pkcs8 + go-golang-org-x-crypto + go-golang-org-x-sync)) + (home-page "https://go.mongodb.org/mongo-driver") + (synopsis "MongoDB Go Driver") + (description + "This package provides a driver for @code{Mongo} data base.") + (license license:asl2.0))) + (define-public go-mvdan-cc-editorconfig (package (name "go-mvdan-cc-editorconfig") |