1{ 2 lib, 3 buildPythonPackage, 4 callPackage, 5 fetchPypi, 6 pytestCheckHook, 7 pythonOlder, 8}: 9 10buildPythonPackage rec { 11 pname = "pycategories"; 12 version = "1.2.0"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchPypi { 18 inherit pname version; 19 hash = "sha256-vXDstelOdlnlZOoVPwx2cykdw3xSbCRoAPwI1sU3gJk="; 20 }; 21 22 postPatch = '' 23 substituteInPlace setup.py \ 24 --replace "'pytest-runner'," "" 25 substituteInPlace setup.cfg \ 26 --replace "--cov-report term --cov=categories" "" 27 ''; 28 29 # Is private because the author states it's unmaintained 30 # and shouldn't be used in production code 31 propagatedBuildInputs = [ (callPackage ./infix.nix { }) ]; 32 33 nativeCheckInputs = [ pytestCheckHook ]; 34 35 meta = with lib; { 36 description = "Implementation of some concepts from category theory"; 37 homepage = "https://gitlab.com/danielhones/pycategories"; 38 changelog = "https://gitlab.com/danielhones/pycategories/-/blob/v${version}/CHANGELOG.rst"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ dmvianna ]; 41 }; 42}