2015-09-15 11:26:18 +02:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, jdk, gcc, xorg
|
2017-01-14 11:48:38 +01:00
|
|
|
, htmlunit-driver, chromedriver, chromeSupport ? true }:
|
2014-02-27 13:06:23 +01:00
|
|
|
|
2014-11-05 12:27:33 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
2017-10-07 11:54:23 +02:00
|
|
|
minorVersion = "3.6";
|
|
|
|
patchVersion = "0";
|
2014-11-05 12:27:33 +01:00
|
|
|
arch = if stdenv.system == "x86_64-linux" then "amd64"
|
|
|
|
else if stdenv.system == "i686-linux" then "i386"
|
|
|
|
else "";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2014-02-27 13:06:23 +01:00
|
|
|
name = "selenium-server-standalone-${version}";
|
2017-10-07 11:54:23 +02:00
|
|
|
version = "${minorVersion}.${patchVersion}";
|
2014-02-27 13:06:23 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-07 11:54:23 +02:00
|
|
|
url = "http://selenium-release.storage.googleapis.com/${minorVersion}/selenium-server-standalone-${version}.jar";
|
|
|
|
sha256 = "11v340nm8vzqc2bkmbjfm9a7j4dj0bi9bfk8wdpfan0fb8prf772";
|
2014-02-27 13:06:23 +01:00
|
|
|
};
|
|
|
|
|
2014-11-05 12:27:33 +01:00
|
|
|
unpackPhase = "true";
|
|
|
|
|
|
|
|
buildInputs = [ jre makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-02-27 13:06:23 +01:00
|
|
|
mkdir -p $out/share/lib/${name}
|
|
|
|
cp $src $out/share/lib/${name}/${name}.jar
|
2014-11-05 12:27:33 +01:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/selenium-server \
|
2017-10-07 11:54:23 +02:00
|
|
|
--add-flags "-cp $out/share/lib/${name}/${name}.jar:${htmlunit-driver}/share/lib/${htmlunit-driver.name}/${htmlunit-driver.name}.jar" \
|
2017-01-14 11:48:38 +01:00
|
|
|
--add-flags ${optionalString chromeSupport "-Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"} \
|
2017-10-07 11:54:23 +02:00
|
|
|
--add-flags "org.openqa.grid.selenium.GridLauncherV3"
|
2014-02-27 13:06:23 +01:00
|
|
|
'';
|
|
|
|
|
2014-11-05 12:27:33 +01:00
|
|
|
meta = {
|
2014-02-27 13:06:23 +01:00
|
|
|
homepage = https://code.google.com/p/selenium;
|
2014-11-11 14:20:43 +01:00
|
|
|
description = "Selenium Server for remote WebDriver";
|
2014-11-05 12:27:33 +01:00
|
|
|
maintainers = with maintainers; [ coconnor offline ];
|
2014-02-27 13:06:23 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|