diff options
author | Shepherd on Tux02 | 2024-06-20 08:37:15 -0500 |
---|---|---|
committer | Shepherd on Tux02 | 2024-06-20 08:37:15 -0500 |
commit | fe5fd5cb23907f8e37edafda96bafa608a3e0e7f (patch) | |
tree | 0b4cec2038dde07fe26f1c6882369f36a9545a19 /gn/packages/java.scm | |
parent | f0f8dc84eca7088177797f84db05314537615c77 (diff) | |
parent | 0362ee068a39ce9a5fd6f0fba9cd5586211f07f1 (diff) | |
download | guix-bioinformatics-fe5fd5cb23907f8e37edafda96bafa608a3e0e7f.tar.gz |
Merge branch 'master' of /home/git/public/guix-bioinformatics
Diffstat (limited to 'gn/packages/java.scm')
-rw-r--r-- | gn/packages/java.scm | 96 |
1 files changed, 56 insertions, 40 deletions
diff --git a/gn/packages/java.scm b/gn/packages/java.scm index cdd9d00..f39c5c7 100644 --- a/gn/packages/java.scm +++ b/gn/packages/java.scm @@ -19,6 +19,7 @@ (define-module (gn packages java) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix download) #:use-module (guix git-download) @@ -27,16 +28,24 @@ #:use-module (guix build-system ant) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages bash) #:use-module (gnu packages bioinformatics) #:use-module (gnu packages certs) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) #:use-module (gnu packages gcc) - #:use-module (gnu packages icu4c) #:use-module (gnu packages java) #:use-module (gnu packages java-compression) #:use-module (gnu packages perl) #:use-module (srfi srfi-1)) +;; This is an attempt to make a smaller version of openjdk +(define openjdk11-minimal + (package/inherit openjdk11 + (inputs + (modify-inputs (package-inputs openjdk11) + (replace "cups" cups-minimal))))) + ;; ---------------------------------------------------------------------------- ;; WORKING PACKAGES ;; ---------------------------------------------------------------------------- @@ -315,7 +324,8 @@ piece of information.") (base32 "13fjhhcjgnynxscaymkn3rpdciplbg2m2qmihc7fxsylgn4m6gxk")))) (build-system ant-build-system) (arguments - `(#:build-target "zip-nojre" + `(#:jdk ,openjdk11-minimal + #:build-target "zip-nojre" #:test-target "runalltests" #:phases (modify-phases %standard-phases @@ -325,8 +335,7 @@ piece of information.") (("\"git\"") "\"echo\"") (("\\$\\{vcs\\.cmd\\.out\\}") "${product.version}") (("\\$\\{build\\.time\\}") "1970-01-01") - (("-\\$\\{rtg\\.vcs\\.commit\\.revision\\}") "")) - #t)) + (("-\\$\\{rtg\\.vcs\\.commit\\.revision\\}") "")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) @@ -337,52 +346,59 @@ piece of information.") (invoke "unzip" (string-append pkg "-nojre.zip")) (copy-recursively (string-append pkg "/") ".") (delete-file-recursively pkg) - (delete-file (string-append pkg "-nojre.zip"))) - #t))) + (delete-file (string-append pkg "-nojre.zip")))))) (add-after 'install 'create-rtg.cfg - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (with-output-to-file (string-append out "/rtg.cfg") (lambda _ (format #t "RTG_JAVA=\"~a\"~@ RTG_TALKBACK=false~@ RTG_USAGE=false~%" - (which "java")))) - #t))) - (add-after 'install 'install-completions - (lambda* (#:key outputs #:allow-other-keys) - (install-file "installer/resources/common/scripts/rtg-bash-completion" - (string-append (assoc-ref outputs "out") - "/share/bash-completion/completions")) - #t)) + (search-input-file inputs "/bin/java"))))))) + (add-after 'install 'create-wrapper-script + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (wrapper (string-append out "/bin/rtg"))) + ;; We want an executable in the bin directory without rewriting + ;; the existing wrapper script. + (mkdir-p (dirname wrapper)) + (with-output-to-file wrapper + (lambda _ + (format #t "#!~a~@ + exec -a \"$0\" \"~a/rtg\" \"$@\"~%" + (search-input-file inputs "/bin/bash") + out))) + (chmod wrapper #o555)))) + (add-after 'install 'install-completions + (lambda* (#:key outputs #:allow-other-keys) + (install-file "installer/resources/common/scripts/rtg-bash-completion" + (string-append (assoc-ref outputs "out") + "/share/bash-completion/completions")))) (delete 'generate-jar-indices)))) ; manually installed (inputs - `(("java-commons-collections" ,java-commons-collections) - ("java-commons-compress" ,java-commons-compress) - ("java-commons-lang" ,java-commons-lang) - ;("java-graal-sdk" ,java-graal-sdk) - ;("java-gzipfix" ,java-gzipfix) - ;("java-htsjdk" ,java-sam-rtg) - ("java-icu4j" ,java-icu4j) - ;("java-js" ,java-js) - ;("java-js-scriptengine" ,java-js-scriptengine) - ;("java-json-simple" ,java-json-simple) - ;("java-regex" ,java-regex) - ;("java-rplot" ,java-rplot) - ("java-snappy" ,java-snappy) - ;("java-truffle-api" ,java-truffle-api) - ;("java-velocity" ,java-velocity) - ;("java-velocity-tools-generic" ,java-velocity-tools-generic) - )) + (list bash-minimal ; for the wrapper script + java-commons-collections + java-commons-compress + java-commons-lang + ;java-gzipfix + ;java-sam-rtg + ;java-json-simple + ;java-rplot + java-snappy + ;java-velocity + ;java-velocity-tools-generic + )) (native-inputs - `(;("java-findbugs-annotations" ,java-findbugs-annotations) - ;("java-findbugs-jsr305" ,java-findbugs-jsr305) - ;("java-jumble-annotations" ,java-jumble-annotations) - ;; for tests - ("java-hamcrest-core" ,java-hamcrest-core) - ("java-junit" ,java-junit) - ;("java-spelling" ,java-spelling) - ("unzip" ,unzip))) + (list ;java-findbugs-annotations + ;java-findbugs-jsr305 + ;java-jumble-annotations + ;; for tests + java-hamcrest-core + java-junit + ;java-spelling + ;; For the 'install phase. + unzip)) (home-page "https://github.com/RealTimeGenomics/rtg-tools/") (synopsis "Utilities for accurate VCF comparison and manipulation") (description "RTG Tools is a subset of RTG Core that includes several useful |