Files
nixpkgs/pkgs/development/python-modules/httpcore/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

81 lines
1.4 KiB
Nix

{
lib,
anyio,
buildPythonPackage,
certifi,
fetchFromGitHub,
hatchling,
hatch-fancy-pypi-readme,
h11,
h2,
pproxy,
pytest-asyncio,
pytest-httpbin,
pytest-trio,
pytestCheckHook,
pythonOlder,
socksio,
trio,
# for passthru.tests
httpx,
httpx-socks,
respx,
}:
buildPythonPackage rec {
pname = "httpcore";
version = "1.0.9";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "encode";
repo = "httpcore";
tag = version;
hash = "sha256-YtAbx0iXN7u8pMBXQBUydvAH6ilH+veklvxSh5EVFXo=";
};
build-system = [
hatchling
hatch-fancy-pypi-readme
];
dependencies = [
certifi
h11
];
optional-dependencies = {
asyncio = [ anyio ];
http2 = [ h2 ];
socks = [ socksio ];
trio = [ trio ];
};
nativeCheckInputs = [
pproxy
pytest-asyncio
pytest-httpbin
pytest-trio
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
pythonImportsCheck = [ "httpcore" ];
__darwinAllowLocalNetworking = true;
passthru.tests = {
inherit httpx httpx-socks respx;
};
meta = {
changelog = "https://github.com/encode/httpcore/blob/${version}/CHANGELOG.md";
description = "Minimal low-level HTTP client";
homepage = "https://github.com/encode/httpcore";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ ris ];
};
}