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