diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-07-29 16:10:06 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-08-05 13:39:44 +0200 |
commit | 44a768b8901cf3fb1c7a39c1f6e2d90062f62c97 (patch) | |
tree | 2d4294a56e3168024b2abf91bb6f25f9129e6812 /gnu/packages | |
parent | 5c1212919f9f76678fae7226f8f81b6ca01ba3a2 (diff) |
gnu: Add java-eclipse-rdf4j-model-api.
Since RDF4J is a large framework with many parts, this patch also prepares
some boilerplate code for the other packages.
* gnu/packages/java-rdf.scm (%rdf4j-version, %rdf4j-sha256, %rdf4j-source)
(rdf4j-common-arguments): New variables.
(java-eclipse-rdf4j-model-api): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/java-rdf.scm | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/java-rdf.scm b/gnu/packages/java-rdf.scm index 066b383c5a..bf83c9ab5e 100644 --- a/gnu/packages/java-rdf.scm +++ b/gnu/packages/java-rdf.scm @@ -99,3 +99,47 @@ implementing java-commons-rdf-api."))) (synopsis "Simple implementation of RDF 1.1 concepts") (description "This package provides a simple implementation of RDF 1.1 concepts in Java."))) + +(define %rdf4j-version "3.7.7") +(define %rdf4j-sha256 + (base32 "1lala4wjl5lbg45jdgd94rfkvdg6r4vq23k3q54bkk9q3w9v2bdx")) +(define %rdf4j-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/eclipse/rdf4j") + (commit %rdf4j-version))) + (file-name (git-file-name "rdf4j" %rdf4j-version)) + (sha256 %rdf4j-sha256) + (modules '((guix build utils))) + (snippet #~(begin (delete-file-recursively "site"))))) + +(define (rdf4j-common-arguments jar-name directory) + (list #:source-dir "src/main/java" + #:test-dir "src/test/java" + #:tests? #f ; tests require junit 5 + #:jar-name jar-name + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir (lambda _ (chdir #$directory))) + (add-after 'chdir 'fix-pom + (lambda _ + (substitute* "pom.xml" + (("\\$\\{project\\.groupId\\}") "org.eclipse.rdf4j")))) + (replace 'install + (install-from-pom "pom.xml"))))) + +(define-public java-eclipse-rdf4j-model-api + (package + (name "java-eclipse-rdf4j-model-api") + (version %rdf4j-version) + (source %rdf4j-source) + (build-system ant-build-system) + (arguments + (rdf4j-common-arguments "rdf4j-model-api.jar" + "core/model-api")) + (home-page "https://rdf4j.org/") + (synopsis "RDF4J model interfaces") + (description "This package provides interfaces for the RDF data model used +in the RDF4J framework.") + (license license:epl1.0))) |