Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 ant, 7 jdk, 8 xmlstarlet, 9 axis2, 10 dbus_java, 11}: 12 13stdenv.mkDerivation (finalAttrs: { 14 pname = "DisnixWebService"; 15 version = "0.10.1"; 16 17 src = fetchFromGitHub { 18 owner = "svanderburg"; 19 repo = "DisnixWebService"; 20 rev = "DisnixWebService-${finalAttrs.version}"; 21 hash = "sha256-zcYr2Ytx4pevSthTQLpnQ330wDxN9dWsZA20jbO6PxQ="; 22 }; 23 24 patches = [ 25 # Correct the DisnixWebService build for compatibility with Axis2 1.8.1 26 # See https://github.com/svanderburg/DisnixWebService/pull/2 27 (fetchpatch { 28 url = "https://github.com/svanderburg/DisnixWebService/commit/cee99c6af744b5dda16728a70ebd2800f61871a0.patch"; 29 hash = "sha256-4rSEN8AwivUXUCIUYFBRIoE19jVDv+Vpgakmy8fR06A="; 30 }) 31 ]; 32 33 nativeBuildInputs = [ 34 ant 35 jdk 36 xmlstarlet 37 ]; 38 39 env = { 40 PREFIX = "\${env.out}"; 41 AXIS2_LIB = "${axis2}/lib"; 42 AXIS2_WEBAPP = "${axis2}/webapps/axis2"; 43 DBUS_JAVA_LIB = "${dbus_java}/share/java"; 44 }; 45 46 prePatch = '' 47 # add modificationtime="0" to the <jar> and <war> tasks to achieve reproducibility 48 xmlstarlet ed -L -a "//jar|//war" -t attr -n "modificationtime" -v "0" build.xml 49 50 sed -i -e "s|#JAVA_HOME=|JAVA_HOME=${jdk}|" \ 51 -e "s|#AXIS2_LIB=|AXIS2_LIB=${axis2}/lib|" \ 52 scripts/disnix-soap-client 53 ''; 54 55 buildPhase = '' 56 runHook preBuild 57 ant 58 runHook postBuild 59 ''; 60 61 installPhase = '' 62 runHook preInstall 63 ant install 64 runHook postInstall 65 ''; 66 67 meta = { 68 description = "SOAP interface and client for Disnix"; 69 mainProgram = "disnix-soap-client"; 70 homepage = "https://github.com/svanderburg/DisnixWebService"; 71 changelog = "https://github.com/svanderburg/DisnixWebService/blob/${finalAttrs.src.rev}/NEWS.txt"; 72 license = lib.licenses.mit; 73 maintainers = [ lib.maintainers.sander ]; 74 platforms = lib.platforms.linux; 75 }; 76})