2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-10-16 20:44:37 +00:00
|
|
|
, dufte
|
2020-04-24 23:36:52 +00:00
|
|
|
, matplotlib
|
|
|
|
, numpy
|
|
|
|
, pipdate
|
|
|
|
, tqdm
|
2020-10-16 20:44:37 +00:00
|
|
|
, rich
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
|
|
|
, isPy27
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "perfplot";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "0.8.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nschloe";
|
|
|
|
repo = "perfplot";
|
|
|
|
rev = "v${version}";
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "0avb0inx8qh8ss3j460v3z6mmn863hswa3bl19vkh475ndsjwmp0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-10-16 20:44:37 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-10-16 20:44:37 +00:00
|
|
|
dufte
|
2020-04-24 23:36:52 +00:00
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
pipdate
|
2020-10-16 20:44:37 +00:00
|
|
|
rich
|
2020-04-24 23:36:52 +00:00
|
|
|
tqdm
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2020-10-16 20:44:37 +00:00
|
|
|
export HOME=$TMPDIR
|
|
|
|
mkdir -p $HOME/.matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
|
|
|
|
pytest test/perfplot_test.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Performance plots for Python code snippets";
|
|
|
|
homepage = "https://github.com/nschloe/perfplot";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|