2015-09-15 10:26:18 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, jdk, gcc, xorg
|
2014-11-05 11:27:33 +00:00
|
|
|
, chromedriver, chromeSupport ? true }:
|
2014-02-27 12:06:23 +00:00
|
|
|
|
2014-11-05 11:27:33 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
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 12:06:23 +00:00
|
|
|
name = "selenium-server-standalone-${version}";
|
2016-04-12 14:20:54 +01:00
|
|
|
version = "2.53.0";
|
2014-02-27 12:06:23 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-12 14:20:54 +01:00
|
|
|
url = "http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-${version}.jar";
|
|
|
|
sha256 = "0dp0n5chl1frjy9pcyjvpcdgv1f4dkslh2bpydpxwc5isfzqrf37";
|
2014-02-27 12:06:23 +00:00
|
|
|
};
|
|
|
|
|
2014-11-05 11:27:33 +00:00
|
|
|
unpackPhase = "true";
|
|
|
|
|
|
|
|
buildInputs = [ jre makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-02-27 12:06:23 +00:00
|
|
|
mkdir -p $out/share/lib/${name}
|
|
|
|
cp $src $out/share/lib/${name}/${name}.jar
|
2014-11-05 11:27:33 +00:00
|
|
|
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"}
|
2014-02-27 12:06:23 +00:00
|
|
|
'';
|
|
|
|
|
2014-11-05 11:27:33 +00:00
|
|
|
meta = {
|
2014-02-27 12:06:23 +00:00
|
|
|
homepage = https://code.google.com/p/selenium;
|
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;
|
|
|
|
};
|
|
|
|
}
|