Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.1 kB · 107 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108{ stdenv, lib, buildPythonPackage, fetchFromGitHub, setuptools, curl-impersonate-chrome, cffi, certifi, charset-normalizer, cryptography, fastapi, httpx, proxy-py, pytest-asyncio, pytest-trio, pytestCheckHook, python-multipart, trustme, uvicorn, websockets, writableTmpDirAsHomeHook,}:
buildPythonPackage rec { pname = "curl-cffi"; version = "0.12.0"; pyproject = true;
src = fetchFromGitHub { owner = "lexiforest"; repo = "curl_cffi"; tag = "v${version}"; hash = "sha256-VE/b1Cs/wpZlu7lOURT/QfP7DuNudD441zG603LT4LM="; };
patches = [ ./use-system-libs.patch ]; buildInputs = [ curl-impersonate-chrome ];
build-system = [ cffi setuptools ];
dependencies = [ cffi certifi ];
env = lib.optionalAttrs stdenv.cc.isGNU { NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; };
pythonImportsCheck = [ "curl_cffi" ];
nativeCheckInputs = [ charset-normalizer cryptography fastapi httpx proxy-py pytest-asyncio pytest-trio pytestCheckHook python-multipart trustme uvicorn websockets writableTmpDirAsHomeHook ];
preCheck = '' # import from $out rm -r curl_cffi '';
enabledTestPaths = [ "tests/unittest" ];
disabledTestPaths = [ # test accesses network "tests/unittest/test_smoke.py::test_async" ];
disabledTests = [ # FIXME ImpersonateError: Impersonating chrome136 is not supported "test_impersonate_without_version" "test_with_impersonate" # InvalidURL: Invalid URL component 'path' "test_update_params" # tests access network "test_add_handle" "test_socket_action" "test_without_impersonate" ];
__darwinAllowLocalNetworking = true;
meta = with lib; { changelog = "https://github.com/lexiforest/curl_cffi/releases/tag/${src.tag}"; description = "Python binding for curl-impersonate via cffi"; homepage = "https://curl-cffi.readthedocs.io"; license = licenses.mit; maintainers = with maintainers; [ chuangzhu ]; };}