depot/third_party/nixpkgs/pkgs/development/python-modules/pproxy/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

56 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pycryptodome,
uvloop,
setuptools,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pproxy";
version = "2.7.9";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "qwj";
repo = "python-proxy";
rev = "7fccf8dd62204f34b0aa3a70fc568fd6ddff7728";
sha256 = "sha256-bOqDdNiaZ5MRi/UeF0hJwMs+rfQBKRsTmXrZ6ieIguo=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
pycryptodome
uvloop
];
pythonImportsCheck = [ "pproxy" ];
disabledTests = [
# Tests try to connect to outside Internet, so disabled
"api_server"
"api_client"
];
# test suite doesn't use test runner. so need to run ``python ./tests/*``
checkPhase = ''
shopt -s extglob
for f in ./tests/!(${builtins.concatStringsSep "|" disabledTests}).py ; do
echo "***Testing $f***"
eval "python $f"
done
'';
meta = with lib; {
description = "Proxy server that can tunnel among remote servers by regex rules";
mainProgram = "pproxy";
homepage = "https://github.com/qwj/python-proxy";
license = licenses.mit;
maintainers = with maintainers; [ drewrisinger ];
};
}