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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
2020-09-26 13:16:11 +00:00
, buildPythonPackage
, fetchFromGitHub
2020-09-26 13:16:11 +00:00
, pythonOlder
, importlib-metadata
, matplotlib
, numpy
, pytestCheckHook
, setuptools
2020-09-26 13:16:11 +00:00
}:
buildPythonPackage rec {
pname = "dufte";
version = "0.2.29";
format = "pyproject";
disabled = pythonOlder "3.6";
2020-09-26 13:16:11 +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
};
nativeBuildInputs = [
setuptools
];
2020-09-26 13:16:11 +00:00
propagatedBuildInputs = [
matplotlib
numpy
] ++ lib.optionals (pythonOlder "3.8") [
2020-09-26 13:16:11 +00:00
importlib-metadata
];
preCheck = ''
export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
'';
nativeCheckInputs = [
pytestCheckHook
];
2021-02-02 12:41:05 +00:00
2020-09-26 13:16:11 +00:00
pythonImportsCheck = [ "dufte" ];
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 ];
};
}