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