depot/third_party/nixpkgs/pkgs/development/python-modules/undetected-chromedriver/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

54 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
looseversion,
requests,
selenium,
websockets,
}:
buildPythonPackage {
pname = "undetected-chromedriver";
version = "3.5.5";
pyproject = true;
src = fetchFromGitHub {
owner = "ultrafunkamsterdam";
repo = "undetected-chromedriver";
# Upstream uses the summaries of commits for specifying versions
rev = "0aa5fbe252370b4cb2b95526add445392cad27ba";
hash = "sha256-Qe+GrsUPnhjJMDgjdUCloapjj0ggFlm/Dr42WLcmb1o=";
};
build-system = [ setuptools ];
dependencies = [
looseversion
requests
selenium
websockets
];
# No tests
doCheck = false;
pythonImportsCheck = [ "undetected_chromedriver" ];
postPatch = ''
substituteInPlace undetected_chromedriver/patcher.py \
--replace-fail \
"from distutils.version import LooseVersion" \
"from looseversion import LooseVersion"
'';
meta = with lib; {
description = "Python library for the custom Selenium ChromeDriver that passes all bot mitigation systems";
homepage = "https://github.com/ultrafunkamsterdam/undetected-chromedriver";
license = licenses.gpl3Only;
maintainers = with lib.maintainers; [ paveloom ];
};
}