at 23.11-beta 40 lines 1.1 kB view raw
1{ lib, stdenv, fetchzip, jre_headless }: 2 3stdenv.mkDerivation rec { 4 pname = "xmlbeans"; 5 version = "5.1.1-20220819"; 6 7 src = fetchzip { 8 # old releases are deleted from the cdn 9 url = "https://web.archive.org/web/20230313151507/https://dlcdn.apache.org/poi/xmlbeans/release/bin/xmlbeans-bin-${version}.zip"; 10 sha256 = "sha256-TDnWo1uJWL6k6Z8/uaF2LBNzRVQMHYopYze/2Fb/0aI="; 11 }; 12 13 postPatch = '' 14 rm bin/*.cmd 15 substituteInPlace bin/dumpxsb \ 16 --replace 'echo `dirname $0`' "" 17 18 substituteInPlace bin/_setlib \ 19 --replace 'echo XMLBEANS_LIB=$XMLBEANS_LIB' "" 20 21 for file in bin/*; do 22 substituteInPlace $file \ 23 --replace "java " "${jre_headless}/bin/java " 24 done 25 ''; 26 27 installPhase = '' 28 mkdir -p $out 29 chmod +x bin/* 30 cp -r bin/ lib/ $out/ 31 ''; 32 33 meta = with lib; { 34 description = "Java library for accessing XML by binding it to Java types"; 35 homepage = "https://xmlbeans.apache.org/"; 36 downloadPage = "https://dlcdn.apache.org/poi/xmlbeans/release/bin/"; 37 license = licenses.asl20; 38 maintainers = with maintainers; [ ]; 39 }; 40}