20 buildPythonPackage rec {
23 format = "setuptools";
25 disabled = pythonOlder "3.7";
27 src = fetchFromGitHub {
30 # check if there is a newer tag with or without -python suffix
31 rev = "refs/tags/selenium-${version}";
32 hash = "sha256-ykZdL2Rn+bU8do3e9zf9pJtInBNRGLcXi5pD1vm7OJY=";
35 patches = [ ./dont-build-the-selenium-manager.patch ];
43 DST_PREFIX=$out/${python.sitePackages}/selenium/webdriver/
44 DST_REMOTE=$DST_PREFIX/remote/
45 DST_FF=$DST_PREFIX/firefox
46 cp ../rb/lib/selenium/webdriver/atoms/getAttribute.js $DST_REMOTE
47 cp ../rb/lib/selenium/webdriver/atoms/isDisplayed.js $DST_REMOTE
48 cp ../rb/lib/selenium/webdriver/atoms/findElements.js $DST_REMOTE
49 cp ../javascript/cdp-support/mutation-listener.js $DST_REMOTE
50 cp ../third_party/js/selenium/webdriver.json $DST_FF/webdriver_prefs.json
52 + lib.optionalString stdenv.hostPlatform.isDarwin ''
53 mkdir -p $DST_PREFIX/common/macos
54 ln -s ${lib.getExe selenium-manager} $DST_PREFIX/common/macos/
56 + lib.optionalString stdenv.hostPlatform.isLinux ''
57 mkdir -p $DST_PREFIX/common/linux/
58 ln -s ${lib.getExe selenium-manager} $DST_PREFIX/common/linux/
61 propagatedBuildInputs = [
68 ] ++ urllib3.optional-dependencies.socks;
75 __darwinAllowLocalNetworking = true;
78 testing-vaultwarden = nixosTests.vaultwarden;
82 description = "Bindings for Selenium WebDriver";
83 homepage = "https://selenium.dev/";
84 license = licenses.asl20;
85 maintainers = with maintainers; [ jraygauthier ];