1{ lib, fetchFromGitHub, buildPythonPackage, pythonOlder, pytest }: 2 3buildPythonPackage rec { 4 pname = "eth-typing"; 5 version = "2.2.2"; 6 7 # Tests are missing from the PyPI source tarball so let's use GitHub 8 # https://github.com/ethereum/eth-typing/issues/8 9 src = fetchFromGitHub { 10 owner = "ethereum"; 11 repo = pname; 12 rev = "v${version}"; 13 sha256 = "0rkvkacxla4y2blkkfdsq1ywnyqsvg8pwhvadznbag1bfzja4xhv"; 14 }; 15 16 # setuptools-markdown uses pypandoc which is broken at the moment 17 preConfigure = '' 18 substituteInPlace setup.py --replace \'setuptools-markdown\' "" 19 ''; 20 21 disabled = pythonOlder "3.5"; 22 23 checkInputs = [ pytest ]; 24 25 checkPhase = '' 26 pytest . 27 ''; 28 29 meta = { 30 description = "Common type annotations for Ethereum Python packages"; 31 homepage = "https://github.com/ethereum/eth-typing"; 32 license = lib.licenses.mit; 33 maintainers = with lib.maintainers; [ jluttine ]; 34 }; 35}