2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-09-26 13:16:11 +00:00
|
|
|
, buildPythonPackage
|
2021-08-01 09:10:05 +00:00
|
|
|
, fetchFromGitHub
|
2020-09-26 13:16:11 +00:00
|
|
|
, pythonOlder
|
|
|
|
, importlib-metadata
|
|
|
|
, matplotlib
|
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
2022-09-19 03:09:15 +00:00
|
|
|
, setuptools
|
2020-09-26 13:16:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dufte";
|
2022-01-22 15:05:31 +00:00
|
|
|
version = "0.2.29";
|
2022-09-19 03:09:15 +00:00
|
|
|
format = "pyproject";
|
2021-08-01 09:10:05 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-09-26 13:16:11 +00:00
|
|
|
|
2021-08-01 09:10:05 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nschloe";
|
|
|
|
repo = pname;
|
2022-01-20 23:55:57 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256:0ccsmpj160xj6w503a948aw8icj55mw9414xnmijmmjvlwhm0p48";
|
2020-09-26 13:16:11 +00:00
|
|
|
};
|
2022-09-19 03:09:15 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
2020-09-26 13:16:11 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
numpy
|
2021-01-24 00:29:22 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
2020-09-26 13:16:11 +00:00
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2022-01-22 19:46:16 +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
|
|
|
|
'';
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-01 09:10:05 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-02-02 12:41:05 +00:00
|
|
|
|
2020-09-26 13:16:11 +00:00
|
|
|
pythonImportsCheck = [ "dufte" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-09-26 13:16:11 +00:00
|
|
|
description = "Clean matplotlib plots";
|
|
|
|
homepage = "https://github.com/nschloe/dufte";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|