uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
112
pkgs/development/python-modules/httpx/default.nix
Normal file
112
pkgs/development/python-modules/httpx/default.nix
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
{ lib
|
||||
, async_generator
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, certifi
|
||||
, charset-normalizer
|
||||
, httpcore
|
||||
, rfc3986
|
||||
, sniffio
|
||||
, h2
|
||||
, socksio
|
||||
, isPyPy
|
||||
, brotli
|
||||
, brotlicffi
|
||||
, click
|
||||
, rich
|
||||
, pygments
|
||||
, python
|
||||
, pytestCheckHook
|
||||
, pytest-asyncio
|
||||
, pytest-trio
|
||||
, typing-extensions
|
||||
, trustme
|
||||
, uvicorn
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "httpx";
|
||||
version = "0.22.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "encode";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-hQmQodGpVG23IZSsWV7rB1iB6QAudDao/8YshIgpmas=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
certifi
|
||||
charset-normalizer
|
||||
httpcore
|
||||
rfc3986
|
||||
sniffio
|
||||
] ++ lib.optionals (pythonOlder "3.7") [
|
||||
async_generator
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
http2 = [ h2 ];
|
||||
socks = [ socksio ];
|
||||
brotli = if isPyPy then [ brotlicffi ] else [ brotli ];
|
||||
cli = [ click rich pygments ];
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
pytest-asyncio
|
||||
pytest-trio
|
||||
trustme
|
||||
typing-extensions
|
||||
uvicorn
|
||||
] ++ passthru.optional-dependencies.http2
|
||||
++ passthru.optional-dependencies.brotli
|
||||
++ passthru.optional-dependencies.socks;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "rfc3986[idna2008]>=1.3,<2" "rfc3986>=1.3"
|
||||
'';
|
||||
|
||||
# testsuite wants to find installed packages for testing entrypoint
|
||||
preCheck = ''
|
||||
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
|
||||
'';
|
||||
|
||||
pytestFlagsArray = [
|
||||
"-W"
|
||||
"ignore::DeprecationWarning"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# httpcore.ConnectError: [Errno 101] Network is unreachable
|
||||
"test_connect_timeout"
|
||||
# httpcore.ConnectError: [Errno -2] Name or service not known
|
||||
"test_async_proxy_close"
|
||||
"test_sync_proxy_close"
|
||||
# sensitive to charset_normalizer output
|
||||
"iso-8859-1"
|
||||
"test_response_no_charset_with_iso_8859_1_content"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"tests/test_main.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"httpx"
|
||||
];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "The next generation HTTP client";
|
||||
homepage = "https://github.com/encode/httpx";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ costrouc fab ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue