2023-03-15 16:39:30 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, flit-core
|
|
|
|
, flit-scm
|
|
|
|
, sympy
|
|
|
|
, pytestCheckHook
|
|
|
|
, sphinx
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "measurement";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "3.2.2";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coddingtonbear";
|
|
|
|
repo = "python-measurement";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-ULId0W10FaAtSgVY5ctQL3FPETVr+oq6TKWd/W53viM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
flit-scm
|
|
|
|
sphinx
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2023-03-15 16:39:30 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "--cov=measurement" ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
sympy
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Use and manipulate unit-aware measurement objects in Python";
|
|
|
|
homepage = "https://github.com/coddingtonbear/python-measurement";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/coddingtonbear/python-measurement/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bhipple ];
|
|
|
|
};
|
|
|
|
}
|