1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "strenum"; 10 version = "0.4.15"; 11 format = "setuptools"; 12 13 disabled = pythonOlder "3.7"; 14 15 src = fetchFromGitHub { 16 owner = "irgeek"; 17 repo = "StrEnum"; 18 rev = "refs/tags/v${version}"; 19 hash = "sha256-LrDLIWiV/zIbl7CwKh7DAy4LoLyY7+hfUu8nqduclnA="; 20 }; 21 22 postPatch = '' 23 substituteInPlace setup.py \ 24 --replace '"pytest-runner"' "" 25 substituteInPlace pytest.ini \ 26 --replace " --cov=strenum --cov-report term-missing --black --pylint" "" 27 ''; 28 29 nativeCheckInputs = [ 30 pytestCheckHook 31 ]; 32 33 pythonImportsCheck = [ 34 "strenum" 35 ]; 36 37 meta = with lib; { 38 description = "MOdule for enum that inherits from str"; 39 homepage = "https://github.com/irgeek/StrEnum"; 40 changelog = "https://github.com/irgeek/StrEnum/releases/tag/v${version}"; 41 license = with licenses; [ mit ]; 42 maintainers = with maintainers; [ fab ]; 43 }; 44}