1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
69 lines
1.3 KiB
Nix
69 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
anyio,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
hatchling,
|
|
httpcore,
|
|
httpx,
|
|
pytestCheckHook,
|
|
pytest-cov-stub,
|
|
starlette,
|
|
trio,
|
|
uvicorn,
|
|
wsproto,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "httpx-ws";
|
|
version = "0.7.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "frankie567";
|
|
repo = "httpx-ws";
|
|
tag = "v${version}";
|
|
hash = "sha256-ixaD7X6V/tUalZbYtic7D9lRqv8yGnwl+j5m832n/hQ=";
|
|
};
|
|
|
|
# we don't need to use the hatch-regex-commit plugin
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail 'source = "regex_commit"' "" \
|
|
--replace-fail 'commit_extra_args = ["-e"]' "" \
|
|
--replace-fail '"hatch-regex-commit"' ""
|
|
'';
|
|
|
|
build-system = [ hatchling ];
|
|
|
|
dependencies = [
|
|
anyio
|
|
httpcore
|
|
httpx
|
|
wsproto
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-cov-stub
|
|
starlette
|
|
trio
|
|
uvicorn
|
|
];
|
|
|
|
pythonImportsCheck = [ "httpx_ws" ];
|
|
|
|
disabledTestPaths = [
|
|
# hang
|
|
"tests/test_api.py"
|
|
];
|
|
|
|
meta = {
|
|
description = "WebSocket support for HTTPX";
|
|
homepage = "https://github.com/frankie567/httpx-ws";
|
|
changelog = "https://github.com/frankie567/httpx-ws/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
}
|