ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / selenium / default.nix
blob2656f460ff6a69523cf6ec57c6c73060aa9836f4
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
4 , geckodriver
5 , pytestCheckHook
6 , pythonOlder
7 , trio
8 , trio-websocket
9 , urllib3
10 , nixosTests
13 buildPythonPackage rec {
14   pname = "selenium";
15   version = "4.5.0";
16   disabled = pythonOlder "3.7";
18   src = fetchFromGitHub {
19     owner = "SeleniumHQ";
20     repo = "selenium";
21     # check if there is a newer tag with or without -python suffix
22     rev = "refs/tags/selenium-${version}";
23     hash = "sha256-K90CQYTeX9GKpP0ahxLx2HO5HG0P6MN7jeWmHtfiOns=";
24   };
26   postPatch = ''
27     substituteInPlace py/selenium/webdriver/firefox/service.py \
28       --replace 'DEFAULT_EXECUTABLE_PATH = "geckodriver"' 'DEFAULT_EXECUTABLE_PATH = "${geckodriver}/bin/geckodriver"'
29   '';
31   preConfigure = ''
32     cd py
33   '';
35   propagatedBuildInputs = [
36     trio
37     trio-websocket
38     urllib3
39   ] ++ urllib3.optional-dependencies.secure
40   ++ urllib3.optional-dependencies.socks;
42   checkInputs = [
43     pytestCheckHook
44   ];
46   passthru.tests = {
47     testing-vaultwarden = nixosTests.vaultwarden;
48   };
50   meta = with lib; {
51     description = "Bindings for Selenium WebDriver";
52     homepage = "https://selenium.dev/";
53     license = licenses.asl20;
54     maintainers = with maintainers; [ jraygauthier SuperSandro2000 ];
55   };