Merge: matrix-synapse: 1.122.0 -> 1.123.0 (#378018)
[NixPkgs.git] / pkgs / development / python-modules / undetected-chromedriver / default.nix
blobbcb349bfe36dbd607d3c288f1ba860d333ca786b
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   setuptools,
8   looseversion,
9   requests,
10   selenium,
11   websockets,
14 buildPythonPackage {
15   pname = "undetected-chromedriver";
16   version = "3.5.5";
17   pyproject = true;
19   src = fetchFromGitHub {
20     owner = "ultrafunkamsterdam";
21     repo = "undetected-chromedriver";
22     # Upstream uses the summaries of commits for specifying versions
23     rev = "0aa5fbe252370b4cb2b95526add445392cad27ba";
24     hash = "sha256-Qe+GrsUPnhjJMDgjdUCloapjj0ggFlm/Dr42WLcmb1o=";
25   };
27   build-system = [ setuptools ];
29   dependencies = [
30     looseversion
31     requests
32     selenium
33     websockets
34   ];
36   # No tests
37   doCheck = false;
39   pythonImportsCheck = [ "undetected_chromedriver" ];
41   postPatch = ''
42     substituteInPlace undetected_chromedriver/patcher.py \
43       --replace-fail \
44         "from distutils.version import LooseVersion" \
45         "from looseversion import LooseVersion"
46   '';
48   meta = with lib; {
49     description = "Python library for the custom Selenium ChromeDriver that passes all bot mitigation systems";
50     homepage = "https://github.com/ultrafunkamsterdam/undetected-chromedriver";
51     license = licenses.gpl3Only;
52     maintainers = with lib.maintainers; [ paveloom ];
53   };