selenium-server-standalone: restore htmlunit-driver support

It was moved to a separate project between versions 2.45 and 2.53:
https://github.com/SeleniumHQ/selenium/commit/2d3150b
This commit is contained in:
Ganesh Sittampalam 2017-01-14 10:48:38 +00:00
parent b8b1892546
commit f0c230c2c7
3 changed files with 31 additions and 3 deletions

View File

@ -0,0 +1,25 @@
{ stdenv, fetchurl }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "htmlunit-driver-standalone-${version}";
version = "2.21";
src = fetchurl {
url = "https://github.com/SeleniumHQ/htmlunit-driver/releases/download/${version}/htmlunit-driver-standalone-${version}.jar";
sha256 = "1wrbam0hb036717z3y73lsw4pwp5sdiw2i1818kg9pvc7i3fb3yn";
};
unpackPhase = "true";
installPhase = "install -D $src $out/share/lib/${name}/${name}.jar";
meta = {
homepage = https://github.com/SeleniumHQ/htmlunit-driver;
description = "A WebDriver server for running Selenium tests on the HtmlUnit headless browser";
maintainers = with maintainers; [ coconnor offline ];
platforms = platforms.all;
license = licenses.asl20;
};
}

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, makeWrapper, jre, jdk, gcc, xorg
, chromedriver, chromeSupport ? true }:
, htmlunit-driver, chromedriver, chromeSupport ? true }:
with stdenv.lib;
@ -25,8 +25,9 @@ in stdenv.mkDerivation rec {
mkdir -p $out/share/lib/${name}
cp $src $out/share/lib/${name}/${name}.jar
makeWrapper ${jre}/bin/java $out/bin/selenium-server \
--add-flags "-jar $out/share/lib/${name}/${name}.jar" \
--add-flags ${optionalString chromeSupport "-Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"}
--add-flags "-cp ${htmlunit-driver}/share/lib/${htmlunit-driver.name}/${htmlunit-driver.name}.jar:$out/share/lib/${name}/${name}.jar" \
--add-flags ${optionalString chromeSupport "-Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"} \
--add-flags "org.openqa.grid.selenium.GridLauncher"
'';
meta = {

View File

@ -6356,6 +6356,8 @@ in
heroku = callPackage ../development/tools/heroku { };
htmlunit-driver = callPackage ../development/tools/selenium/htmlunit-driver { };
hyenae = callPackage ../tools/networking/hyenae { };
icestorm = callPackage ../development/tools/icestorm { };