Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 48 lines 943 B view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, httpcore 5, httpx 6, pytest-asyncio 7, pytest-cov 8, pytestCheckHook 9, trio 10}: 11 12buildPythonPackage rec { 13 pname = "respx"; 14 version = "0.17.0"; 15 16 src = fetchFromGitHub { 17 owner = "lundberg"; 18 repo = pname; 19 rev = version; 20 sha256 = "sha256-unGAIsslGXOUHXr0FKzC9bX6+Q3mNGZ9Z/dtjz0gkj4="; 21 }; 22 23 # Coverage is under 100 % due to the excluded tests 24 postPatch = '' 25 substituteInPlace setup.cfg --replace "--cov-fail-under 100" "" 26 ''; 27 28 propagatedBuildInputs = [ httpx ]; 29 30 checkInputs = [ 31 httpcore 32 httpx 33 pytest-asyncio 34 pytest-cov 35 pytestCheckHook 36 trio 37 ]; 38 39 disabledTests = [ "test_pass_through" ]; 40 pythonImportsCheck = [ "respx" ]; 41 42 meta = with lib; { 43 description = "Python library for mocking HTTPX"; 44 homepage = "https://lundberg.github.io/respx/"; 45 license = with licenses; [ bsd3 ]; 46 maintainers = with maintainers; [ fab ]; 47 }; 48}