diff options
author | Vladimír Čunát <v@cunat.cz> | 2023-11-16 22:06:22 +0100 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2023-11-16 22:06:22 +0100 |
commit | a7a8f8253db3f32cc15baf527d36ef7171425eba (patch) | |
tree | 5de25f1c82e7892f6aec7b3e5ddb718ff0c50df2 /pkgs/development/python-modules/selenium/default.nix | |
parent | f31242fcfd14e870eb6898fc8849bc4dee883054 (diff) | |
parent | 391aafc3d6b17ed5517795eb8b9c41ed7c6082e3 (diff) |
Merge #263535: staging-next 2023-10-26
Diffstat (limited to 'pkgs/development/python-modules/selenium/default.nix')
-rw-r--r-- | pkgs/development/python-modules/selenium/default.nix | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix index fdb052a474991..086c53108976e 100644 --- a/pkgs/development/python-modules/selenium/default.nix +++ b/pkgs/development/python-modules/selenium/default.nix @@ -8,12 +8,15 @@ , trio , trio-websocket , urllib3 +, pytest-trio , nixosTests +, stdenv +, python }: buildPythonPackage rec { pname = "selenium"; - version = "4.12.0"; + version = "4.14.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -23,18 +26,30 @@ buildPythonPackage rec { repo = "selenium"; # check if there is a newer tag with or without -python suffix rev = "refs/tags/selenium-${version}"; - hash = "sha256-A2lI40bPSIri/0yp6C3aJZBX5p6ON1fWGfJTcul9/2o="; + hash = "sha256-cTMCKfFLUlJDbTUQA3Z/pKCE1RQQRMb4K8hKKn9HqvU="; }; - postPatch = '' - substituteInPlace py/selenium/webdriver/firefox/service.py \ - --replace 'DEFAULT_EXECUTABLE_PATH = "geckodriver"' 'DEFAULT_EXECUTABLE_PATH = "${geckodriver}/bin/geckodriver"' - ''; - preConfigure = '' cd py ''; + postInstall = '' + DST_PREFIX=$out/lib/${python.libPrefix}/site-packages/selenium/webdriver/ + DST_REMOTE=$DST_PREFIX/remote/ + DST_FF=$DST_PREFIX/firefox + cp ../rb/lib/selenium/webdriver/atoms/getAttribute.js $DST_REMOTE + cp ../rb/lib/selenium/webdriver/atoms/isDisplayed.js $DST_REMOTE + cp ../rb/lib/selenium/webdriver/atoms/findElements.js $DST_REMOTE + cp ../javascript/cdp-support/mutation-listener.js $DST_REMOTE + cp ../third_party/js/selenium/webdriver.json $DST_FF/webdriver_prefs.json + '' + lib.optionalString stdenv.isDarwin '' + mkdir -p $DST_PREFIX/common/macos + cp ../common/manager/macos/selenium-manager $DST_PREFIX/common/macos + '' + lib.optionalString stdenv.isLinux '' + mkdir -p $DST_PREFIX/common/linux/ + cp ../common/manager/linux/selenium-manager $DST_PREFIX/common/linux/ + ''; + propagatedBuildInputs = [ certifi trio @@ -44,6 +59,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook + pytest-trio ]; passthru.tests = { |