2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, jre
|
2017-01-14 10:48:38 +00:00
|
|
|
, htmlunit-driver, chromedriver, chromeSupport ? true }:
|
2014-02-27 12:06:23 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
with lib;
|
2014-11-05 11:27:33 +00:00
|
|
|
|
|
|
|
let
|
2020-11-25 23:58:30 +00:00
|
|
|
minorVersion = "3.141";
|
|
|
|
patchVersion = "59";
|
2014-11-05 11:27:33 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "selenium-server-standalone";
|
2017-10-07 10:54:23 +01:00
|
|
|
version = "${minorVersion}.${patchVersion}";
|
2014-02-27 12:06:23 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-07 10:54:23 +01:00
|
|
|
url = "http://selenium-release.storage.googleapis.com/${minorVersion}/selenium-server-standalone-${version}.jar";
|
2020-11-25 23:58:30 +00:00
|
|
|
sha256 = "1jzkx0ahsb27zzzfvjqv660x9fz2pbcddgmhdzdmasxns5vipxxc";
|
2014-02-27 12:06:23 +00:00
|
|
|
};
|
|
|
|
|
2019-06-19 16:45:34 +01:00
|
|
|
dontUnpack = true;
|
2014-11-05 11:27:33 +00:00
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre ];
|
2014-11-05 11:27:33 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2019-08-15 13:41:18 +01:00
|
|
|
mkdir -p $out/share/lib/${pname}-${version}
|
|
|
|
cp $src $out/share/lib/${pname}-${version}/${pname}-${version}.jar
|
2014-11-05 11:27:33 +00:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/selenium-server \
|
2019-08-15 13:41:18 +01:00
|
|
|
--add-flags "-cp $out/share/lib/${pname}-${version}/${pname}-${version}.jar:${htmlunit-driver}/share/lib/${htmlunit-driver.name}/${htmlunit-driver.name}.jar" \
|
2017-01-14 10:48:38 +00:00
|
|
|
--add-flags ${optionalString chromeSupport "-Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"} \
|
2017-10-07 10:54:23 +01:00
|
|
|
--add-flags "org.openqa.grid.selenium.GridLauncherV3"
|
2014-02-27 12:06:23 +00:00
|
|
|
'';
|
|
|
|
|
2014-11-05 11:27:33 +00:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.seleniumhq.org/";
|
2014-11-11 13:20:43 +00:00
|
|
|
description = "Selenium Server for remote WebDriver";
|
2014-11-05 11:27:33 +00:00
|
|
|
maintainers = with maintainers; [ coconnor offline ];
|
2014-02-27 12:06:23 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|