mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 23:06:59 +01:00
gnu: r-dismo: Replace bundled jars.
Fixes <https://issues.guix.gnu.org/63783>. * gnu/packages/cran.scm (r-dismo)[source]: Delete bundled jars. [inputs]: Add java-maxent. [native-inputs]: Add JDK and zip. [arguments]: Add phases 'build-jars and 'strip-jar-timestamps.
This commit is contained in:
parent
341b4b2a97
commit
bb27e3b8b1
1 changed files with 30 additions and 1 deletions
|
@ -37368,11 +37368,40 @@ (define-public r-dismo
|
||||||
(uri (cran-uri "dismo" version))
|
(uri (cran-uri "dismo" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1msc75xnc9lbnn8pivd5j4jvb1b9p3xgybfm2ak2mpb2aplz5837"))))
|
"1msc75xnc9lbnn8pivd5j4jvb1b9p3xgybfm2ak2mpb2aplz5837"))
|
||||||
|
(snippet
|
||||||
|
'(for-each delete-file
|
||||||
|
(list "inst/java/dismo.jar"
|
||||||
|
"inst/java/maxent.jar")))))
|
||||||
(properties `((upstream-name . "dismo")))
|
(properties `((upstream-name . "dismo")))
|
||||||
(build-system r-build-system)
|
(build-system r-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:modules '((guix build utils)
|
||||||
|
(guix build r-build-system)
|
||||||
|
((guix build ant-build-system) #:prefix java:))
|
||||||
|
#:imported-modules
|
||||||
|
(cons '(guix build ant-build-system)
|
||||||
|
%r-build-system-modules)
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'build-jars
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((maxent (search-input-file inputs
|
||||||
|
"/share/java/maxent/maxent.jar")))
|
||||||
|
(install-file maxent "inst/java/")
|
||||||
|
(with-directory-excursion "java"
|
||||||
|
(invoke "javac" "-cp" maxent "mebridge.java")
|
||||||
|
(invoke "jar" "cvf" "../inst/java/dismo.jar"
|
||||||
|
"mebridge.class")))))
|
||||||
|
(add-after 'install 'strip-jar-timestamps
|
||||||
|
(assoc-ref java:%standard-phases 'strip-jar-timestamps)))))
|
||||||
|
(inputs
|
||||||
|
(list java-maxent))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list r-raster r-rcpp r-sp r-terra))
|
(list r-raster r-rcpp r-sp r-terra))
|
||||||
|
(native-inputs
|
||||||
|
(list `(,icedtea-8 "jdk") zip))
|
||||||
(home-page "https://rspatial.org/raster/sdm/")
|
(home-page "https://rspatial.org/raster/sdm/")
|
||||||
(synopsis "Species distribution modeling")
|
(synopsis "Species distribution modeling")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in a new issue