1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, pytestCheckHook 6}: 7 8buildPythonPackage rec { 9 pname = "more-properties"; 10 version = "1.1.1"; 11 12 # upstream requires >= 3.6 but only 3.7 includes dataclasses 13 disabled = pythonOlder "3.7"; 14 15 format = "setuptools"; 16 17 src = fetchFromGitHub { 18 owner = "madman-bob"; 19 repo = "python-more-properties"; 20 rev = version; 21 hash = "sha256-dKG97rw5IG19m7u3ZDBM2yGScL5cFaKBvGZxPVJaUTE="; 22 }; 23 24 postPatch = '' 25 mv pypi_upload/setup.py . 26 substituteInPlace setup.py \ 27 --replace "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]" 28 29 # dataclasses is included in Python 3.7 30 substituteInPlace requirements.txt \ 31 --replace dataclasses "" 32 ''; 33 34 checkInputs = [ 35 pytestCheckHook 36 ]; 37 38 pythonImportsCheck = [ "more_properties" ]; 39 40 meta = { 41 description = "A collection of property variants"; 42 homepage = "https://github.com/madman-bob/python-more-properties"; 43 license = lib.licenses.mit; 44 maintainers = with lib.maintainers; [ dotlambda ]; 45 }; 46}