2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-10-16 20:44:37 +00:00
|
|
|
, buildPythonPackage
|
2021-08-05 21:33:18 +00:00
|
|
|
, fetchFromGitHub
|
2020-10-16 20:44:37 +00:00
|
|
|
, pythonOlder
|
|
|
|
, importlib-metadata
|
|
|
|
, matplotlib
|
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2020-10-16 20:44:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dufte";
|
2022-01-23 02:10:13 +00:00
|
|
|
version = "0.2.29";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "pyproject";
|
2021-08-05 21:33:18 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nschloe";
|
|
|
|
repo = pname;
|
2022-02-10 20:34:41 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256:0ccsmpj160xj6w503a948aw8icj55mw9414xnmijmmjvlwhm0p48";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
numpy
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
2020-10-16 20:44:37 +00:00
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2022-01-23 02:10:13 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.config/matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
|
|
|
|
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
|
|
|
|
'';
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
pythonImportsCheck = [ "dufte" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-16 20:44:37 +00:00
|
|
|
description = "Clean matplotlib plots";
|
|
|
|
homepage = "https://github.com/nschloe/dufte";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|