2013-02-25 23:40:29 +00:00
|
|
|
{ stdenv, fetchurl, cairo, fontconfig, freetype, gdk_pixbuf, glib
|
2013-06-20 14:21:25 +01:00
|
|
|
, glibc, gtk, libX11, makeWrapper, nspr, nss, pango, unzip, gconf
|
2014-02-14 22:37:08 +00:00
|
|
|
, libXi, libXrender, libXext
|
2013-02-25 23:40:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# note: there is a i686 version available as well
|
|
|
|
assert stdenv.system == "x86_64-linux";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-02-14 22:37:08 +00:00
|
|
|
name = "chromedriver_linux64";
|
2013-02-25 23:40:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-03-06 12:55:42 +00:00
|
|
|
url = "http://chromedriver.storage.googleapis.com/2.14/${name}.zip";
|
|
|
|
sha256 = "18kpky1v5pc3fv6kv9i2mf4wr4qicmfhf27h9zqy18gh16rlwrin";
|
2013-02-25 23:40:29 +00:00
|
|
|
};
|
|
|
|
|
2013-06-20 14:21:25 +01:00
|
|
|
buildInputs = [ unzip makeWrapper ];
|
2013-02-25 23:40:29 +00:00
|
|
|
|
|
|
|
unpackPhase = "unzip $src";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv chromedriver $out/bin
|
|
|
|
patchelf --set-interpreter ${glibc}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver
|
|
|
|
wrapProgram "$out/bin/chromedriver" \
|
2015-03-06 14:11:41 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "$(cat ${stdenv.cc}/nix-support/orig-cc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:${libXrender}/lib:${gconf}/lib:${libXext}/lib:${libXi}/lib:\$LD_LIBRARY_PATH"
|
2013-02-25 23:40:29 +00: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 11:08:26 +00:00
|
|
|
platforms = platforms.linux;
|
2013-02-25 23:40:29 +00:00
|
|
|
};
|
2013-06-20 14:21:25 +01:00
|
|
|
}
|