guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 5f2d626113271eb5eccbfc72d5569a3e5ed8e0e1
Author: Roman Scherer <[email protected]>
AuthorDate: Fri Oct 17 14:45:31 2025 +0000

    gnu: Add go-github-com-anthropics-anthropic-sdk-go.
    
    * gnu/packages/golang-web.scm
    (go-github-com-anthropics-anthropic-sdk-go): New variable.
    
    Change-Id: Ice1fcb4e975a72c8d27d8f03397c52a18cfe7d4b
    
    Change-Id: I5ee9f0cc79e59d2d7a2836b64ac4c5ead39a72b6
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/golang-web.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 4d14b1fcbe..c3e13aee59 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -657,6 +657,55 @@ variable.  The variable can contain a comma-separated list 
of values, for
 example @code{GOPPROF=http,block}.")
     (license license:expat)))
 
+(define-public go-github-com-anthropics-anthropic-sdk-go
+  (package
+    (name "go-github-com-anthropics-anthropic-sdk-go")
+    (version "1.14.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/anthropics/anthropic-sdk-go";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "12a9f7ddp8nx0x35yvsdjzmv2qjx9p7d7qwkl4qhqnv6l5bsifxb"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/anthropics/anthropic-sdk-go"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'remove-vertex-and-examples
+            (lambda* (#:key import-path #:allow-other-keys)
+              ;; Remove vertex package and examples - they require
+              ;; google.golang.org/api which is not yet packaged.
+              (with-directory-excursion (string-append "src/" import-path)
+                (delete-file-recursively "vertex")
+                (delete-file-recursively "examples"))))
+          (add-before 'check 'set-test-environment
+            (lambda _
+              ;; Skip integration tests that require a mock Prism
+              ;; server (localhost:4010). Unit tests in internal/ and
+              ;; packages/ subdirectories will still run (~51 tests).
+              (setenv "SKIP_MOCK_TESTS" "true"))))))
+    (native-inputs
+     (list go-github-com-stretchr-testify))
+    (propagated-inputs
+     (list go-github-com-aws-aws-sdk-go-v2
+           go-github-com-aws-aws-sdk-go-v2-config
+           go-github-com-aws-aws-sdk-go-v2-credentials
+           go-github-com-tidwall-gjson
+           go-github-com-tidwall-sjson
+           go-golang-org-x-oauth2))
+    (home-page "https://github.com/anthropics/anthropic-sdk-go";)
+    (synopsis "Go client library for the Anthropic API")
+    (description
+     "This package provides a client library for convenient access
+to the Anthropic REST API.  It includes support for message creation,
+streaming, tool calling, and integration with Amazon Bedrock.")
+    (license license:expat)))
+
 (define-public go-github-com-apex-log
   (package
     (name "go-github-com-apex-log")

Reply via email to