2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
curl-impersonate-chrome,
|
|
|
|
cffi,
|
|
|
|
certifi,
|
2024-05-15 15:35:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "curl-cffi";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.6.4";
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yifeikong";
|
|
|
|
repo = "curl_cffi";
|
2024-06-05 15:53:02 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-bNBpZAIdfub2osByo827RBw/gouCmNt8uVN0y1KdcUk=";
|
2024-05-15 15:35:15 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
patches = [ ./use-system-libs.patch ];
|
|
|
|
buildInputs = [ curl-impersonate-chrome ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ cffi ];
|
2024-05-15 15:35:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cffi
|
|
|
|
certifi
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "curl_cffi" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python binding for curl-impersonate via cffi";
|
|
|
|
homepage = "https://curl-cffi.readthedocs.io";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ chuangzhu ];
|
|
|
|
};
|
|
|
|
}
|