10 stdenv.mkDerivation rec {
11 pname = "java-service-wrapper";
15 url = "https://wrapper.tanukisoftware.com/download/${version}/wrapper_${version}_src.tar.gz";
16 hash = "sha256-O0fn+s3RIIriVw6sMB2nSKAGtVF0Tz6Ns4Jb9OpcbgY=";
21 buildInputs = [ cunit ncurses ];
23 nativeBuildInputs = [ ant jdk ];
26 substituteInPlace default.properties \
27 --replace "javac.target.version=1.4" "javac.target.version=8"
33 export JAVA_HOME=${jdk}/lib/openjdk/
34 export JAVA_TOOL_OPTIONS=-Djava.home=$JAVA_HOME
35 export CLASSPATH=${jdk}/lib/openjdk/lib/tools.jar
37 ant -f build.xml -Dbits=${if stdenv.hostPlatform.isi686 then "32" else "64"}
45 mkdir -p $out/{bin,lib}
46 cp bin/wrapper $out/bin/wrapper
47 cp lib/wrapper.jar $out/lib/wrapper.jar
48 cp lib/libwrapper.so $out/lib/libwrapper.so
54 description = "Enables a Java Application to be run as a Windows Service or Unix Daemon";
55 homepage = "https://wrapper.tanukisoftware.com/";
56 changelog = "https://wrapper.tanukisoftware.com/doc/english/release-notes.html#${version}";
57 license = licenses.gpl2Only;
58 platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
59 maintainers = [ maintainers.suhr ];
60 mainProgram = "wrapper";
61 # Broken for Musl at 2024-01-17. Errors as:
62 # logger.c:81:12: fatal error: gnu/libc-version.h: No such file or directory
63 # Tracking issue: https://github.com/NixOS/nixpkgs/issues/281557
64 broken = stdenv.hostPlatform.isMusl;