2021-10-28 06:52:43 +00:00
|
|
|
{ lib, stdenv, fetchzip, jre_headless }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xmlbeans";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "5.1.1-20220819";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2023-03-24 00:07:29 +00:00
|
|
|
# old releases are deleted from the cdn
|
|
|
|
url = "https://web.archive.org/web/20230313151507/https://dlcdn.apache.org/poi/xmlbeans/release/bin/xmlbeans-bin-${version}.zip";
|
|
|
|
sha256 = "sha256-TDnWo1uJWL6k6Z8/uaF2LBNzRVQMHYopYze/2Fb/0aI=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm bin/*.cmd
|
|
|
|
substituteInPlace bin/dumpxsb \
|
|
|
|
--replace 'echo `dirname $0`' ""
|
|
|
|
|
|
|
|
substituteInPlace bin/_setlib \
|
|
|
|
--replace 'echo XMLBEANS_LIB=$XMLBEANS_LIB' ""
|
|
|
|
|
|
|
|
for file in bin/*; do
|
|
|
|
substituteInPlace $file \
|
|
|
|
--replace "java " "${jre_headless}/bin/java "
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
chmod +x bin/*
|
|
|
|
cp -r bin/ lib/ $out/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Java library for accessing XML by binding it to Java types";
|
|
|
|
homepage = "https://xmlbeans.apache.org/";
|
|
|
|
downloadPage = "https://dlcdn.apache.org/poi/xmlbeans/release/bin/";
|
|
|
|
license = licenses.asl20;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
}
|