nixpkgs/pkgs/development/python-modules/dufte/default.nix

47 lines
911 B
Nix
Raw Normal View History

{ lib
2020-09-26 14:16:11 +01:00
, buildPythonPackage
, fetchPypi
, isPy3k
, pythonOlder
, importlib-metadata
, matplotlib
, numpy
2021-02-02 12:41:05 +00:00
, exdown
2020-09-26 14:16:11 +01:00
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "dufte";
2021-01-30 21:13:15 +00:00
version = "0.2.12";
2020-09-26 14:16:11 +01:00
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
2021-01-30 21:13:15 +00:00
sha256 = "0ag1d7h1wijkc7v2vpgkbqjlnpiwd4nh8zhxiby0989bpmlp3jr3";
2020-09-26 14:16:11 +01:00
};
format = "pyproject";
propagatedBuildInputs = [
matplotlib
numpy
] ++ 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
'';
2021-02-02 12:41:05 +00:00
checkInputs = [ exdown pytestCheckHook ];
2020-09-26 14:16:11 +01:00
pythonImportsCheck = [ "dufte" ];
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 ];
};
}