1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, isPy3k 5, flit-core 6, flit-scm 7, sympy 8, pytestCheckHook 9, sphinx 10}: 11 12buildPythonPackage rec { 13 pname = "measurement"; 14 version = "3.2.2"; 15 format = "pyproject"; 16 17 disabled = !isPy3k; 18 19 src = fetchFromGitHub { 20 owner = "coddingtonbear"; 21 repo = "python-measurement"; 22 rev = "refs/tags/${version}"; 23 hash = "sha256-ULId0W10FaAtSgVY5ctQL3FPETVr+oq6TKWd/W53viM="; 24 }; 25 26 nativeBuildInputs = [ 27 flit-core 28 flit-scm 29 sphinx 30 ]; 31 32 SETUPTOOLS_SCM_PRETEND_VERSION = version; 33 34 postPatch = '' 35 substituteInPlace pyproject.toml \ 36 --replace "--cov=measurement" "" 37 ''; 38 39 propagatedBuildInputs = [ 40 sympy 41 ]; 42 43 nativeCheckInputs = [ 44 pytestCheckHook 45 ]; 46 47 meta = with lib; { 48 description = "Use and manipulate unit-aware measurement objects in Python"; 49 homepage = "https://github.com/coddingtonbear/python-measurement"; 50 changelog = "https://github.com/coddingtonbear/python-measurement/releases/tag/${version}"; 51 license = licenses.mit; 52 maintainers = with maintainers; [ bhipple ]; 53 }; 54}