diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-03-08 02:42:27 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-03-12 18:24:53 +0100 |
commit | fd27762711a0cdce3f0847ef6305cd512b5e3f29 (patch) | |
tree | 978a8c252193c42e18bfc994b2bc39f011bde2d1 /pkgs | |
parent | 0d20bddf99084db17b59258c0e017996040455fa (diff) |
python3Packages.selenium: 4.15.0 -> 4.18.1
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/selenium/default.nix | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix index 09ddebebe2407..bfb7a95a38597 100644 --- a/pkgs/development/python-modules/selenium/default.nix +++ b/pkgs/development/python-modules/selenium/default.nix @@ -1,12 +1,13 @@ { lib , fetchFromGitHub +, fetchurl , buildPythonPackage , certifi -, geckodriver , pytestCheckHook , pythonOlder , trio , trio-websocket +, typing-extensions , urllib3 , pytest-trio , nixosTests @@ -14,9 +15,28 @@ , python }: +let + # TODO: build these from source, e.g. for aarch64-linux support + # https://github.com/SeleniumHQ/selenium/blob/selenium-4.18.1/common/selenium_manager.bzl + selenium-manager = let + darwin = fetchurl { + url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-8fab886/selenium-manager-macos"; + sha256 = "43168f3c79747b5dd86a6aeb5fc8fb642614899c4ce427e8dcd57737cf70be7f"; + }; + linux = fetchurl { + url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-8fab886/selenium-manager-linux"; + sha256 = "ec6db2c8ea49cf4fafaf52e70ffcbcac3d49d07df7ca11dba49652b9d51d2d1a"; + }; + in { + x86_64-linux = linux; + aarch64-darwin = darwin; + x86_64_darwin = darwin; + }.${stdenv.hostPlatform.system} or (throw "Unsupported architecture: ${stdenv.hostPlatform.system}"); +in + buildPythonPackage rec { pname = "selenium"; - version = "4.15.0"; + version = "4.18.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -26,7 +46,7 @@ buildPythonPackage rec { repo = "selenium"; # check if there is a newer tag with or without -python suffix rev = "refs/tags/selenium-${version}"; - hash = "sha256-AacpHZw6N6RruuBO+bZ3/cxOODe9VPGblKmIm1ffqrc="; + hash = "sha256-1C9Epsk9rFlShxHGGzbWl6smrMzPn2h3yCWlzUIMpY8="; }; preConfigure = '' @@ -44,10 +64,10 @@ buildPythonPackage rec { 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 + cp ${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/ + cp ${selenium-manager} $DST_PREFIX/common/linux/ ''; propagatedBuildInputs = [ @@ -55,6 +75,7 @@ buildPythonPackage rec { trio trio-websocket urllib3 + typing-extensions ] ++ urllib3.optional-dependencies.socks; nativeCheckInputs = [ @@ -67,6 +88,7 @@ buildPythonPackage rec { }; meta = with lib; { + broken = stdenv.isAarch64 && stdenv.isLinux; # no supported manager binary description = "Bindings for Selenium WebDriver"; homepage = "https://selenium.dev/"; license = licenses.asl20; |