nixpkgs/pkgs/applications/networking/soapui/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

52 lines
1.8 KiB
Nix

{ fetchurl, lib, stdenv, writeText, jdk, maven, makeWrapper }:
stdenv.mkDerivation rec {
pname = "soapui";
version = "5.5.0";
src = fetchurl {
url = "https://s3.amazonaws.com/downloads.eviware/soapuios/${version}/SoapUI-${version}-linux-bin.tar.gz";
sha256 = "0v1wiy61jgvlxjk8qdvcnyn1gh2ysxf266zln7r4wpzwd5gc3dpw";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jdk maven ];
installPhase = ''
mkdir -p $out/share/java
cp -R bin lib $out/share/java
makeWrapper $out/share/java/bin/soapui.sh $out/bin/soapui --set SOAPUI_HOME $out/share/java
'';
patches = [
(writeText "soapui-${version}.patch" ''
--- a/bin/soapui.sh
+++ b/bin/soapui.sh
@@ -34,7 +34,7 @@ SOAPUI_CLASSPATH=$SOAPUI_HOME/bin/soapui-${version}.jar:$SOAPUI_HOME/lib/*
export SOAPUI_CLASSPATH
JAVA_OPTS="-Xms128m -Xmx1024m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -Dsoapui.properties=soapui.properties -Dsoapui.home=$SOAPUI_HOME/bin -splash:SoapUI-Spashscreen.png"
-JFXRTPATH=`java -cp $SOAPUI_CLASSPATH com.eviware.soapui.tools.JfxrtLocator`
+JFXRTPATH=`${jdk}/bin/java -cp $SOAPUI_CLASSPATH com.eviware.soapui.tools.JfxrtLocator`
SOAPUI_CLASSPATH=$JFXRTPATH:$SOAPUI_CLASSPATH
if $darwin
@@ -69,4 +69,4 @@ echo = SOAPUI_HOME = $SOAPUI_HOME
echo =
echo ================================
-java $JAVA_OPTS -cp $SOAPUI_CLASSPATH com.eviware.soapui.SoapUI "$@"
+${jdk}/bin/java $JAVA_OPTS -cp $SOAPUI_CLASSPATH com.eviware.soapui.SoapUI "$@"
'')
];
meta = with lib; {
description = "The Most Advanced REST & SOAP Testing Tool in the World";
homepage = "https://www.soapui.org/";
license = "SoapUI End User License Agreement";
maintainers = with maintainers; [ gerschtli ];
platforms = platforms.all;
};
}