2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-09-26 14:16:11 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
|
|
|
, importlib-metadata
|
|
|
|
, matplotlib
|
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dufte";
|
|
|
|
version = "0.2.9";
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0nkaczipbsm8c14j9svxry2wigmn5iharibb6b8g062sjaph8x17";
|
|
|
|
};
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
numpy
|
2021-01-24 00:29:22 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
2020-09-26 14:16:11 +01:00
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
mkdir -p $HOME/.matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
|
|
|
|
'';
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "dufte" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-09-26 14:16:11 +01:00
|
|
|
description = "Clean matplotlib plots";
|
|
|
|
homepage = "https://github.com/nschloe/dufte";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|