841d9c7fc1
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
53 lines
927 B
Nix
53 lines
927 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, dufte
|
|
, matplotlib
|
|
, numpy
|
|
, pipdate
|
|
, tqdm
|
|
, rich
|
|
, pytest
|
|
, isPy27
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "perfplot";
|
|
version = "0.9.5";
|
|
disabled = isPy27;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nschloe";
|
|
repo = "perfplot";
|
|
rev = "v${version}";
|
|
sha256 = "1nr31a7qvipqjycw2flkabnhnc4drbi1xpjm8yjxw2gjzznd1jg4";
|
|
};
|
|
format = "pyproject";
|
|
|
|
propagatedBuildInputs = [
|
|
dufte
|
|
matplotlib
|
|
numpy
|
|
pipdate
|
|
rich
|
|
tqdm
|
|
];
|
|
|
|
checkInputs = [
|
|
pytest
|
|
];
|
|
|
|
checkPhase = ''
|
|
export HOME=$TMPDIR
|
|
mkdir -p $HOME/.matplotlib
|
|
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
|
|
pytest test/perfplot_test.py
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Performance plots for Python code snippets";
|
|
homepage = "https://github.com/nschloe/perfplot";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.costrouc ];
|
|
};
|
|
}
|