evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / se / selendroid / package.nix
blob66a9b97d0db90d391ea5523259a3bbb52100f2d1
1 { lib, stdenv, fetchurl, makeWrapper, jdk, selenium-server-standalone }:
3 let
4     pname = "selendroid-standalone";
5     pluginName = "selendroid-grid-plugin-${version}";
6     version = "0.17.0";
7     srcs = {
8       jar = fetchurl {
9         url = "https://github.com/selendroid/selendroid/releases/download/${version}/selendroid-standalone-${version}-with-dependencies.jar";
10         sha256 = "10lxdsgp711pv8r6dk2aagnbvnn1b25zfqjvz7plc73zqhx1dxvw";
11       };
12       gridPlugin = fetchurl {
13         url = "https://search.maven.org/remotecontent?filepath=io/selendroid/selendroid-grid-plugin/${version}/${pluginName}.jar";
14         sha256 = "1x6cjmp2hpghbgbf8vss0qaj2n4sfl29wp3bc4k1s3hnnpccvz70";
15       };
16     };
18 stdenv.mkDerivation {
19   inherit pname version;
21   dontUnpack = true;
23   nativeBuildInputs = [ makeWrapper ];
24   buildInputs = [ jdk ];
26   installPhase = ''
27     mkdir -p $out/share/lib/selendroid
28     cp ${srcs.jar} $out/share/lib/selendroid/selendroid-standalone-${version}.jar
29     cp ${srcs.gridPlugin} $out/share/lib/selendroid/${pluginName}.jar
31     makeWrapper ${jdk}/bin/java $out/bin/selendroid \
32       --add-flags "-jar $out/share/lib/selendroid/selendroid-standalone-${version}.jar"
33     makeWrapper ${jdk}/bin/java $out/bin/selendroid-selenium \
34       --add-flags "-Dfile.encoding=UTF-8" \
35       --add-flags "-cp ${selenium-server-standalone}/share/lib/${selenium-server-standalone.name}/${selenium-server-standalone.name}.jar:$out/share/lib/selendroid/${pluginName}.jar" \
36       --add-flags "org.openqa.grid.selenium.GridLauncherV3" \
37       --add-flags "-role hub" \
38       --add-flags "-capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher"
39   '';
41   meta = with lib; {
42     homepage = "http://selendroid.io/";
43     description = "Test automation for native or hybrid Android apps and the mobile web";
44     maintainers = with maintainers; [ offline ];
45     platforms = platforms.all;
46     sourceProvenance = with sourceTypes; [ binaryBytecode ];
47     license = licenses.asl20;
48   };