1{
2 fetchurl,
3 lib,
4 stdenv,
5 writeText,
6 jdk,
7 makeWrapper,
8 nixosTests,
9}:
10stdenv.mkDerivation rec {
11 pname = "soapui";
12 version = "5.9.0";
13
14 src = fetchurl {
15 url = "https://dl.eviware.com/soapuios/${version}/SoapUI-${version}-linux-bin.tar.gz";
16 sha256 = "sha256-1FTqsRmy91bNpiyzoVyDiyEF2Zxd1ouMumL3ONCsJ94=";
17 };
18
19 nativeBuildInputs = [ makeWrapper ];
20 buildInputs = [ jdk ];
21
22 installPhase = ''
23 runHook preInstall
24
25 mkdir -p $out/share/java
26 cp -R bin lib $out/share/java
27
28 makeWrapper $out/share/java/bin/soapui.sh $out/bin/soapui --set SOAPUI_HOME $out/share/java
29
30 runHook postInstall
31 '';
32
33 patches = [
34 # Adjust java path to point to derivation paths
35 (writeText "soapui-${version}.patch" ''
36 --- a/bin/soapui.sh
37 +++ b/bin/soapui.sh
38 @@ -50,7 +50,7 @@
39 #JAVA 16
40 JAVA_OPTS="$JAVA_OPTS --illegal-access=permit"
41
42 -JFXRTPATH=`java -cp $SOAPUI_CLASSPATH com.eviware.soapui.tools.JfxrtLocator`
43 +JFXRTPATH=`${jdk}/bin/java -cp $SOAPUI_CLASSPATH com.eviware.soapui.tools.JfxrtLocator`
44 SOAPUI_CLASSPATH=$JFXRTPATH:$SOAPUI_CLASSPATH
45
46 if $darwin
47 @@ -85,4 +85,4 @@
48 echo =
49 echo ================================
50
51 -java $JAVA_OPTS -cp $SOAPUI_CLASSPATH com.eviware.soapui.SoapUI "$@"
52 +${jdk}/bin/java $JAVA_OPTS -cp $SOAPUI_CLASSPATH com.eviware.soapui.SoapUI "$@"
53 '')
54 ];
55
56 passthru.tests = { inherit (nixosTests) soapui; };
57
58 meta = with lib; {
59 description = "Most Advanced REST & SOAP Testing Tool in the World";
60 homepage = "https://www.soapui.org/";
61 sourceProvenance = with sourceTypes; [ binaryBytecode ];
62 license = "SoapUI End User License Agreement";
63 maintainers = with maintainers; [ gerschtli ];
64 platforms = platforms.linux; # we don't fetch the dmg yet
65 mainProgram = "soapui";
66 };
67}