1 { lib, stdenv, fetchurl, makeWrapper, jre
2 , htmlunit-driver, chromedriver, chromeSupport ? true }:
5 minorVersion = "3.141";
8 in stdenv.mkDerivation rec {
9 pname = "selenium-server-standalone";
10 version = "${minorVersion}.${patchVersion}";
13 url = "http://selenium-release.storage.googleapis.com/${minorVersion}/selenium-server-standalone-${version}.jar";
14 sha256 = "1jzkx0ahsb27zzzfvjqv660x9fz2pbcddgmhdzdmasxns5vipxxc";
19 nativeBuildInputs = [ makeWrapper ];
20 buildInputs = [ jre ];
23 mkdir -p $out/share/lib/${pname}-${version}
24 cp $src $out/share/lib/${pname}-${version}/${pname}-${version}.jar
25 makeWrapper ${jre}/bin/java $out/bin/selenium-server \
26 --add-flags "-cp $out/share/lib/${pname}-${version}/${pname}-${version}.jar:${htmlunit-driver}/share/lib/${htmlunit-driver.name}/${htmlunit-driver.name}.jar" \
27 ${lib.optionalString chromeSupport "--add-flags -Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"} \
28 --add-flags "org.openqa.grid.selenium.GridLauncherV3"
32 homepage = "http://www.seleniumhq.org/";
33 description = "Selenium Server for remote WebDriver";
34 sourceProvenance = with sourceTypes; [ binaryBytecode ];
35 license = licenses.asl20;
36 maintainers = with maintainers; [ coconnor offline ];
37 mainProgram = "selenium-server";
38 platforms = platforms.all;