diff mbox series

[bug#54560,42/47] gnu: Add go-github-com-go-openapi-analysis.

Message ID 20220325133211.5128-42-hello@lnikki.la
State New
Headers show
Series [bug#54560,01/47] gnu: Add go-google-golang-org-protobuf. | expand

Commit Message

Leo Nikkilä March 25, 2022, 1:32 p.m. UTC
* gnu/packages/golang.scm (go-github-com-go-openapi-analysis): New
variable.
---
 gnu/packages/golang.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8256ad5ad6..bebde5fe89 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -10135,6 +10135,43 @@  (define-public go-github-com-go-logfmt-logfmt
     (home-page "https://github.com/go-logfmt/logfmt")
     (license license:expat)))
 
+(define-public go-github-com-go-openapi-analysis
+  (package
+    (name "go-github-com-go-openapi-analysis")
+    (version "0.21.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/go-openapi/analysis")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0kwal4skrv4nayif71cdvirsa76vm7s9lrqyac33gsc8gzsfdh7z"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/go-openapi/analysis"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-tests
+           (lambda* (#:key import-path #:allow-other-keys)
+             ;; Skip test that needs network access
+             (substitute* (string-append "src/" import-path "/flatten_test.go")
+               (("func TestFlatten_RemoteAbsolute\\(t \\*testing\\.T\\) \\{"
+                 match)
+                (string-append match "\n\tt.Skip()")))
+             #t)))))
+    (propagated-inputs (list go-github-com-go-openapi-jsonpointer
+                             go-github-com-go-openapi-spec
+                             go-github-com-go-openapi-strfmt
+                             go-github-com-go-openapi-swag))
+    (native-inputs (list go-github-com-stretchr-testify))
+    (synopsis "OpenAPI specification object model analyzer")
+    (description "A foundational library to analyze an OAI specification
+document for easier reasoning about the content.")
+    (home-page "https://github.com/go-openapi/analysis")
+    (license license:asl2.0)))
+
 (define-public go-github-com-go-openapi-errors
   (package
     (name "go-github-com-go-openapi-errors")