guix_mirror_bot pushed a commit to branch go-team
in repository guix.
commit e4cbb81b572d673923ca2d0c7ddaa40b13a135bd
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Wed May 28 00:11:07 2025 +0100
gnu: Add go-github-com-santhosh-tekuri-jsonschema-v5.
* gnu/packages/golang-web.scm
(go-github-com-santhosh-tekuri-jsonschema-v5): New variable.
Change-Id: I52dde5585bd0dceb618e8e6784ba2d8cb278cc97
---
gnu/packages/golang-web.scm | 63 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 304af7ea54..1f2dc25afb 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -9056,6 +9056,69 @@ information from a network device such as statistics,
driver related
information or even the peer of a VETH interface.")
(license license:asl2.0)))
+(define-public go-github-com-santhosh-tekuri-jsonschema-v5
+ (package
+ (name "go-github-com-santhosh-tekuri-jsonschema-v5")
+ (version "5.3.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/santhosh-tekuri/jsonschema")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0fjklx6sik1pp4qpmzsvwfmavd1m9pcsyap1wvajhm2d8wx3vnh0"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Submodules with their own go.mod files and packaged separately:
+ ;;
+ ;; - github.com/santhosh-tekuri/jsonschema/cmd/jv
+ (delete-file-recursively "cmd")))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/santhosh-tekuri/jsonschema/v5"
+ #:test-flags
+ #~(list "-skip" (string-join
+ ;; TODO: Figure out why these test patterns fail.
+ (list "TestDraft2019/optional"
+ "TestDraft2019/refRemote.json"
+ "TestDraft2019/vocabulary.json"
+ "TestDraft2020/dynamicRef.json"
+ "TestDraft2020/optional"
+ "TestDraft2020/refRemote.json"
+ "TestDraft2020/vocabulary.json"
+ "TestDraft4/refRemote.json"
+ "TestDraft6/refRemote.json"
+ "TestDraft7/optional"
+ "TestDraft7/refRemote.json"
+ "TestExtra/draft2020")
+ "|"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'copy-json-schema-specs
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (copy-recursively
+ (string-append #$(this-package-native-input
+ "specification-json-schema-test-suite")
+ "/share/tests")
+ "testdata/JSON-Schema-Test-Suite/tests"))))
+ (add-after 'check 'remove-json-schema-specs
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (delete-file-recursively
+ "testdata/JSON-Schema-Test-Suite/tests")))))))
+ (native-inputs
+ (list specification-json-schema-test-suite))
+ (home-page "https://github.com/santhosh-tekuri/jsonschema")
+ (synopsis "JSONSchema validation using Golang")
+ (description
+ "Package jsonschema provides json-schema compilation and validation.")
+ (license license:asl2.0)))
+
(define-public go-github-com-sherclockholmes-webpush-go
(package
(name "go-github-com-sherclockholmes-webpush-go")