diff options
| author | Mathieu Lirzin <mthl@gnu.org> | 2025-12-27 07:20:07 +0100 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2026-01-25 21:31:06 +0100 |
| commit | 3701dc9beace545085e0effe4ab724290643c24d (patch) | |
| tree | 07132f025f849cdc4a3504941687208c6778cae8 | |
| parent | 279616da6d2705373fbd2b931dcc447a5cdbca77 (diff) | |
gnu: Add cognitect-aws-api.
* gnu/packages/clojure.scm (cognitect-aws-api): New variable.
(clojure-tools-deps): Use it.
Change-Id: I1df8d2c5fceed621c1fc1676c9f766d0ac488b04
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
| -rw-r--r-- | gnu/packages/clojure.scm | 82 |
1 files changed, 59 insertions, 23 deletions
diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm index 0431baf8306..8cae8f1cea2 100644 --- a/gnu/packages/clojure.scm +++ b/gnu/packages/clojure.scm | |||
| @@ -795,6 +795,7 @@ work with command-line arguments.") | |||
| 795 | (build-system clojure-build-system) | 795 | (build-system clojure-build-system) |
| 796 | (arguments | 796 | (arguments |
| 797 | `(#:source-dirs '("src/main/clojure" "src/main/resources") | 797 | `(#:source-dirs '("src/main/clojure" "src/main/resources") |
| 798 | #:java-source-dirs '("src/main/java") | ||
| 798 | #:test-dirs '("src/test/clojure") | 799 | #:test-dirs '("src/test/clojure") |
| 799 | #:doc-dirs '() | 800 | #:doc-dirs '() |
| 800 | ;; FIXME: Could not initialize class | 801 | ;; FIXME: Could not initialize class |
| @@ -802,28 +803,6 @@ work with command-line arguments.") | |||
| 802 | #:tests? #f | 803 | #:tests? #f |
| 803 | #:phases | 804 | #:phases |
| 804 | (modify-phases %standard-phases | 805 | (modify-phases %standard-phases |
| 805 | ;; FIXME: Currently, the S3 transporter depends on ClojureScript, | ||
| 806 | ;; which is very difficult to package due to dependencies on Java | ||
| 807 | ;; libraries with non-standard build systems. Instead of actually | ||
| 808 | ;; packaging these libraries, we just remove the S3 transporter that | ||
| 809 | ;; depends on them. | ||
| 810 | (add-after 'unpack 'remove-s3-transporter | ||
| 811 | (lambda _ | ||
| 812 | (for-each delete-file | ||
| 813 | (list | ||
| 814 | (string-append | ||
| 815 | "src/main/clojure/clojure/" | ||
| 816 | "tools/deps/util/s3_aws_client.clj") | ||
| 817 | (string-append | ||
| 818 | "src/main/clojure/clojure/" | ||
| 819 | "tools/deps/util/s3_transporter.clj") | ||
| 820 | (string-append | ||
| 821 | "src/test/clojure/clojure/" | ||
| 822 | "tools/deps/util/test_s3_transporter.clj"))) | ||
| 823 | (substitute* | ||
| 824 | "src/main/clojure/clojure/tools/deps/util/maven.clj" | ||
| 825 | (("clojure.tools.deps.util.s3-transporter") | ||
| 826 | "")))) | ||
| 827 | (add-before 'build 'reference-clojure-jar-input | 806 | (add-before 'build 'reference-clojure-jar-input |
| 828 | ;; Use static clojure jar from build input at runtime by default. | 807 | ;; Use static clojure jar from build input at runtime by default. |
| 829 | (lambda* (#:key inputs #:allow-other-keys) | 808 | (lambda* (#:key inputs #:allow-other-keys) |
| @@ -843,7 +822,8 @@ work with command-line arguments.") | |||
| 843 | maven-resolver-transport-file | 822 | maven-resolver-transport-file |
| 844 | clojure-tools-gitlibs | 823 | clojure-tools-gitlibs |
| 845 | clojure-tools-cli | 824 | clojure-tools-cli |
| 846 | clojure-data-xml)) | 825 | clojure-data-xml |
| 826 | cognitect-aws-api)) | ||
| 847 | (synopsis "Clojure library supporting clojure-tools") | 827 | (synopsis "Clojure library supporting clojure-tools") |
| 848 | (description "This package provides a functional API for transitive | 828 | (description "This package provides a functional API for transitive |
| 849 | dependency graph expansion and the creation of classpaths.") | 829 | dependency graph expansion and the creation of classpaths.") |
| @@ -1041,3 +1021,59 @@ high-performance Clojure HTTP client and server library with WebSocket and | |||
| 1041 | asynchronous support.") | 1021 | asynchronous support.") |
| 1042 | (home-page "https://github.com/http-kit/http-kit") | 1022 | (home-page "https://github.com/http-kit/http-kit") |
| 1043 | (license license:asl2.0))) | 1023 | (license license:asl2.0))) |
| 1024 | |||
| 1025 | (define-public cognitect-aws-api | ||
| 1026 | (package | ||
| 1027 | (name "cognitect-aws-api") | ||
| 1028 | (version "0.8.774") | ||
| 1029 | (source (origin | ||
| 1030 | (method git-fetch) | ||
| 1031 | (uri (git-reference | ||
| 1032 | (url "https://github.com/cognitect-labs/aws-api") | ||
| 1033 | (commit (string-append "v" version)))) | ||
| 1034 | (file-name (git-file-name name version)) | ||
| 1035 | (sha256 | ||
| 1036 | (base32 | ||
| 1037 | "1y3impishicd8niy1vddx6c80pnbpz24zfr7vysi4r56p1vqnwmb")) | ||
| 1038 | (modules '((guix build utils))) | ||
| 1039 | (snippet | ||
| 1040 | '(begin | ||
| 1041 | (for-each delete-file | ||
| 1042 | (list | ||
| 1043 | ;; Require Cognitect http client | ||
| 1044 | "src/cognitect/aws/http/cognitect.clj" | ||
| 1045 | ;; Requires Babashka. | ||
| 1046 | "test/src/bb_test_runner.clj" | ||
| 1047 | ;; Requires AWS Java SDK v2. | ||
| 1048 | "test/src/cognitect/aws/jdk_v2.clj" | ||
| 1049 | "test/src/cognitect/aws/signers_test.clj" | ||
| 1050 | ;; Remove integration tests. | ||
| 1051 | "test/src/cognitect/aws/client/shared_test.clj" | ||
| 1052 | "test/src/cognitect/aws/api_test.clj" | ||
| 1053 | "test/src/cognitect/client/impl_test.clj" | ||
| 1054 | "test/src/cognitect/client/test_double_test.clj")) | ||
| 1055 | ;; Remove integration tests | ||
| 1056 | (delete-file-recursively "test/src/cognitect/aws/integration"))))) | ||
| 1057 | (build-system clojure-build-system) | ||
| 1058 | (propagated-inputs (list clojure-core-async | ||
| 1059 | clojure-tools-logging | ||
| 1060 | clojure-data-json | ||
| 1061 | clojure-data-xml)) | ||
| 1062 | (native-inputs (list clojure-test-check | ||
| 1063 | http-kit)) | ||
| 1064 | (arguments `(#:source-dirs '("src") | ||
| 1065 | #:doc-dirs '() | ||
| 1066 | #:test-dirs '("test/src" "test/resources") | ||
| 1067 | ;; Allow using java.net.http client. | ||
| 1068 | #:jdk ,openjdk11)) | ||
| 1069 | (synopsis | ||
| 1070 | "Programmatic access to AWS services from Clojure programs") | ||
| 1071 | (description | ||
| 1072 | "This package is an idiomatic, data-oriented Clojure library for invoking AWS | ||
| 1073 | APIs. While the library offers some helper and documentation functions you'll | ||
| 1074 | use at development time, the only functions you ever need at runtime are | ||
| 1075 | client, which creates a client for a given service and invoke, which invokes | ||
| 1076 | an operation on the service. invoke takes a map and returns a map, and works | ||
| 1077 | the same way for every operation on every service.") | ||
| 1078 | (home-page "https://github.com/cognitect-labs/aws-api") | ||
| 1079 | (license license:asl2.0))) | ||
