1{ 2 lib, 3 buildPythonPackage, 4 callPackage, 5 fetchFromGitHub, 6 httpx, 7 pythonOlder, 8 sanic, 9 websockets, 10}: 11 12buildPythonPackage rec { 13 pname = "sanic-testing"; 14 version = "23.12.0"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "sanic-org"; 21 repo = "sanic-testing"; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-pFsGB0QDeO/iliHOitHqBIQtDlwRgFg8nhgMLsopoec="; 24 }; 25 26 outputs = [ 27 "out" 28 "testsout" 29 ]; 30 31 propagatedBuildInputs = [ 32 httpx 33 sanic 34 websockets 35 ]; 36 37 postInstall = '' 38 mkdir $testsout 39 cp -R tests $testsout/tests 40 ''; 41 42 # Check in passthru.tests.pytest to escape infinite recursion with sanic 43 doCheck = false; 44 45 doInstallCheck = false; 46 47 passthru.tests = { 48 pytest = callPackage ./tests.nix { }; 49 }; 50 51 meta = with lib; { 52 description = "Core testing clients for the Sanic web framework"; 53 homepage = "https://github.com/sanic-org/sanic-testing"; 54 changelog = "https://github.com/sanic-org/sanic-testing/releases/tag/v${version}"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ AluisioASG ]; 57 }; 58}