Merge pull request #4843 from offlinehacker/pkgs/selenium/update_chrome_opera
selenium-server-standalone: update -> 2.44, fix opera, create binary, chrome support
This commit is contained in:
commit
50ad7c2125
@ -1,27 +1,52 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, makeWrapper, jre, jdk, gcc, xlibs
|
||||
, chromedriver, chromeSupport ? true }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
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 {
|
||||
name = "selenium-server-standalone-${version}";
|
||||
version = "2.39.0";
|
||||
version = "2.44.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://selenium.googlecode.com/files/${name}.jar";
|
||||
sha256 = "11ixh5x5f9kia2va8wssd3n7y57dkv3snw6xvk85y4qhzg64b65f";
|
||||
url = "http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar";
|
||||
sha256 = "1n53pyrxpmfh9lvr68d1l9rsiw7qr36farirpl3ivkyvnpm5iwm5";
|
||||
};
|
||||
|
||||
unpack = "";
|
||||
unpackPhase = "true";
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/share/lib/${name}
|
||||
cp $src $out/share/lib/${name}/${name}.jar
|
||||
buildInputs = [ jre makeWrapper ];
|
||||
|
||||
# Patch launcher binaries for opera
|
||||
patchPhase = optionalString (arch!="") ''
|
||||
cp $src $TMPDIR/${name}.jar
|
||||
export src=$TMPDIR/${name}.jar
|
||||
|
||||
${jdk}/bin/jar xf $src launchers/launcher-linux-amd64
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${gcc.gcc}/lib/:${gcc.gcc}/lib64:${xlibs.libX11}/lib" \
|
||||
launchers/launcher-linux-${arch}
|
||||
${jdk}/bin/jar uf $src launchers/launcher-linux-${arch}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
installPhase = ''
|
||||
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"}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = https://code.google.com/p/selenium;
|
||||
description = "Selenium Server for remote WebDriver.";
|
||||
maintainers = [ maintainers.coconnor ];
|
||||
maintainers = with maintainers; [ coconnor offline ];
|
||||
platforms = platforms.all;
|
||||
hydraPlatforms = [];
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
||||
|
@ -8256,10 +8256,10 @@ let
|
||||
};
|
||||
|
||||
selenium = buildPythonPackage rec {
|
||||
name = "selenium-2.39.0";
|
||||
name = "selenium-2.44.0";
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://pypi.python.org/packages/source/s/selenium/${name}.tar.gz";
|
||||
sha256 = "1kisndzl9s0vs0a5paqx35hxq28id3xyi1gfsjaixsi6rs0ibhhh";
|
||||
sha256 = "0l70pqwg88imbylcd831vg8nj8ipy4zr331f6qjccss7vn56i2h5";
|
||||
};
|
||||
|
||||
buildInputs = with self; [pkgs.xlibs.libX11];
|
||||
@ -8267,14 +8267,15 @@ let
|
||||
# Recompiling x_ignore_nofocus.so as the original one dlopen's libX11.so.6 by some
|
||||
# absolute paths. Replaced by relative path so it is found when used in nix.
|
||||
x_ignore_nofocus =
|
||||
pkgs.fetchsvn {
|
||||
url = http://selenium.googlecode.com/svn/tags/selenium-2.25.0/cpp/linux-specific;
|
||||
rev = 17641;
|
||||
sha256 = "1wif9r6307qhlcp2zbg6n05yvxxn9ppkxh8gpsplcbyh22zi7bcd";
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "SeleniumHQ";
|
||||
repo = "selenium";
|
||||
rev = "selenium-2.44.0";
|
||||
sha256 = "13aqm0dwy17ghimy7m2mxjwlyc1k7zk5icxzrs1sa896056f1dyy";
|
||||
};
|
||||
|
||||
preInstall = ''
|
||||
cp "${x_ignore_nofocus}/"* .
|
||||
cp "${x_ignore_nofocus}/cpp/linux-specific/"* .
|
||||
sed -i 's|dlopen(library,|dlopen("libX11.so.6",|' x_ignore_nofocus.c
|
||||
gcc -c -fPIC x_ignore_nofocus.c -o x_ignore_nofocus.o
|
||||
gcc -shared \
|
||||
|
Loading…
x
Reference in New Issue
Block a user