1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 setuptools, 7 8 looseversion, 9 requests, 10 selenium, 11 websockets, 12}: 13 14buildPythonPackage { 15 pname = "undetected-chromedriver"; 16 version = "3.5.5"; 17 pyproject = true; 18 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 }; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 looseversion 31 requests 32 selenium 33 websockets 34 ]; 35 36 # No tests 37 doCheck = false; 38 39 pythonImportsCheck = [ "undetected_chromedriver" ]; 40 41 postPatch = '' 42 substituteInPlace undetected_chromedriver/patcher.py \ 43 --replace-fail \ 44 "from distutils.version import LooseVersion" \ 45 "from looseversion import LooseVersion" 46 ''; 47 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; [ ]; 53 }; 54}