1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "strenum"; 10 version = "0.4.8"; 11 format = "setuptools"; 12 13 disabled = pythonOlder "3.7"; 14 15 src = fetchFromGitHub { 16 owner = "irgeek"; 17 repo = "StrEnum"; 18 rev = "v${version}"; 19 hash = "sha256-S64YfF+cbefXRWoeJK99ZPTiO9DUcDaT77hVQd7pKDk="; 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 checkInputs = [ 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 license = with licenses; [ mit ]; 41 maintainers = with maintainers; [ fab ]; 42 }; 43}