2013-02-26 00:40:29 +01:00
|
|
|
{ stdenv, fetchurl, cairo, fontconfig, freetype, gdk_pixbuf, glib
|
2013-06-20 15:21:25 +02:00
|
|
|
, glibc, gtk, libX11, makeWrapper, nspr, nss, pango, unzip, gconf
|
2014-02-14 23:37:08 +01:00
|
|
|
, libXi, libXrender, libXext
|
2013-02-26 00:40:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
# note: there is a i686 version available as well
|
|
|
|
assert stdenv.system == "x86_64-linux";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-05-14 17:18:17 +02:00
|
|
|
product = "chromedriver_linux64";
|
2016-04-12 17:07:56 +02:00
|
|
|
name = "${product}-2.21";
|
|
|
|
version = "2.21";
|
2013-02-26 00:40:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-05-14 17:18:17 +02:00
|
|
|
url = "http://chromedriver.storage.googleapis.com/${version}/${product}.zip";
|
2016-04-12 17:07:56 +02:00
|
|
|
sha256 = "1fhwvqjwqkfm18icacvk0312ii8hf1p03icd3isfcxp7j69qf2wg";
|
2013-02-26 00:40:29 +01:00
|
|
|
};
|
|
|
|
|
2013-06-20 15:21:25 +02:00
|
|
|
buildInputs = [ unzip makeWrapper ];
|
2013-02-26 00:40:29 +01:00
|
|
|
|
|
|
|
unpackPhase = "unzip $src";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv chromedriver $out/bin
|
2015-04-26 19:54:51 +02:00
|
|
|
patchelf --set-interpreter ${glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver
|
2013-02-26 00:40:29 +01:00
|
|
|
wrapProgram "$out/bin/chromedriver" \
|
2016-04-19 11:08:58 +02:00
|
|
|
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib cairo fontconfig freetype gdk_pixbuf glib gtk libX11 nspr nss pango libXrender gconf libXext libXi ]}:\$LD_LIBRARY_PATH"
|
2013-02-26 00:40:29 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://code.google.com/p/chromedriver/;
|
|
|
|
description = "A WebDriver server for running Selenium tests on Chrome";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.goibhniu ];
|
2014-03-16 12:08:26 +01:00
|
|
|
platforms = platforms.linux;
|
2013-02-26 00:40:29 +01:00
|
|
|
};
|
2013-06-20 15:21:25 +02:00
|
|
|
}
|