Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 50 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchzip, 5 jre_headless, 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "xmlbeans"; 10 version = "5.3.0-20241203"; 11 12 src = fetchzip { 13 # old releases are deleted from the cdn 14 url = "https://web.archive.org/web/20250404194918/https://dlcdn.apache.org/poi/xmlbeans/release/bin/apache-xmlbeans-bin-5.3.0-20241203.zip"; 15 hash = "sha256-AeV+s0VfBgb0YbsY6dNJeqcsguZhDmjuyqXT/415a3k="; 16 stripRoot = false; 17 }; 18 19 postPatch = '' 20 cp -r apache-xmlbeans-*/* . 21 rm -r apache-xmlbeans-* 22 rm bin/*.cmd 23 substituteInPlace bin/dumpxsb \ 24 --replace-fail 'echo `dirname $0`' "" 25 substituteInPlace bin/_setlib \ 26 --replace-fail 'echo XMLBEANS_LIB=$XMLBEANS_LIB' "" 27 for file in bin/*; do 28 substituteInPlace $file \ 29 --replace-warn "java " "${jre_headless}/bin/java " 30 done 31 ''; 32 33 installPhase = '' 34 runHook preInstall 35 36 mkdir -p $out 37 chmod +x bin/* 38 cp -r bin/ lib/ $out/ 39 40 runHook postInstall 41 ''; 42 43 meta = { 44 description = "Java library for accessing XML by binding it to Java types"; 45 homepage = "https://xmlbeans.apache.org/"; 46 downloadPage = "https://dlcdn.apache.org/poi/xmlbeans/release/bin/"; 47 license = lib.licenses.asl20; 48 maintainers = [ ]; 49 }; 50})