Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, loguru 6, pytest-asyncio 7, pytest-mypy 8, pytestCheckHook 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "python-utils"; 14 version = "3.5.2"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "WoLpH"; 21 repo = pname; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-FFBWkq7ct4JWSTH4Ldg+pbG/BAiW33puB7lqFPBjptw="; 24 }; 25 26 postPatch = '' 27 sed -i '/--cov/d' pytest.ini 28 sed -i '/--mypy/d' pytest.ini 29 ''; 30 31 passthru.optional-dependencies = { 32 loguru = [ 33 loguru 34 ]; 35 }; 36 37 nativeCheckInputs = [ 38 pytest-asyncio 39 pytest-mypy 40 pytestCheckHook 41 ] ++ passthru.optional-dependencies.loguru; 42 43 pythonImportsCheck = [ 44 "python_utils" 45 ]; 46 47 pytestFlagsArray = [ 48 "_python_utils_tests" 49 ]; 50 51 disabledTests = lib.optionals stdenv.isDarwin [ 52 # Flaky tests on darwin 53 "test_timeout_generator" 54 ]; 55 56 meta = with lib; { 57 description = "Module with some convenient utilities"; 58 homepage = "https://github.com/WoLpH/python-utils"; 59 changelog = "https://github.com/wolph/python-utils/releases/tag/v${version}"; 60 license = licenses.bsd3; 61 maintainers = with maintainers; [ ]; 62 }; 63}