Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 # build-system 8 poetry-core, 9 10 # propagates 11 quart, 12 typing-extensions, 13 14 # tests 15 pytestCheckHook, 16 pytest-asyncio, 17}: 18 19buildPythonPackage rec { 20 pname = "quart-cors"; 21 version = "0.7.0"; 22 format = "pyproject"; 23 24 src = fetchFromGitHub { 25 owner = "pgjones"; 26 repo = "quart-cors"; 27 rev = "refs/tags/${version}"; 28 hash = "sha256-qUzs0CTZHf3fGADBXPkd3CjZ6dnz1t3cTxflMErvz/k="; 29 }; 30 31 nativeBuildInputs = [ poetry-core ]; 32 33 postPatch = '' 34 substituteInPlace pyproject.toml \ 35 --replace "--no-cov-on-fail " "" 36 ''; 37 38 propagatedBuildInputs = [ quart ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ]; 39 40 pythonImportsCheck = [ "quart_cors" ]; 41 42 nativeCheckInputs = [ 43 pytestCheckHook 44 pytest-asyncio 45 ]; 46 47 meta = with lib; { 48 description = "Quart-CORS is an extension for Quart to enable and control Cross Origin Resource Sharing, CORS"; 49 homepage = "https://github.com/pgjones/quart-cors/"; 50 changelog = "https://github.com/pgjones/quart-cors/blob/${src.rev}/CHANGELOG.rst"; 51 license = licenses.mit; 52 maintainers = with maintainers; [ hexa ]; 53 }; 54}