13 # Recompiling x_ignore_nofocus.so as the original one dlopen's libX11.so.6 by some
14 # absolute paths. Replaced by relative path so it is found when used in nix.
19 rev = "selenium-3.6.0";
20 sha256 = "13wf4hx4i7nhl4s8xkziwxl0km1j873syrj4amragj6mpip2wn8v";
24 buildPythonPackage rec {
29 inherit pname version;
30 sha256 = "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy";
33 buildInputs = [xorg.libX11];
35 propagatedBuildInputs = [
39 patchPhase = lib.optionalString stdenv.isLinux ''
40 cp "${x_ignore_nofocus}/cpp/linux-specific/"* .
41 substituteInPlace x_ignore_nofocus.c --replace "/usr/lib/libX11.so.6" "${xorg.libX11.out}/lib/libX11.so.6"
42 cc -c -fPIC x_ignore_nofocus.c -o x_ignore_nofocus.o
44 -Wl,${if stdenv.isDarwin then "-install_name" else "-soname"},x_ignore_nofocus.so \
45 -o x_ignore_nofocus.so \
47 cp -v x_ignore_nofocus.so selenium/webdriver/firefox/${if stdenv.is64bit then "amd64" else "x86"}/
51 description = "The selenium package is used to automate web browser interaction from Python";
52 homepage = "http://www.seleniumhq.org";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ jraygauthier ];