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