3
0
Fork 0
forked from mirrors/nixpkgs
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.

51 lines
1 KiB
Nix
Raw Normal View History

{ lib
2020-09-26 14:16:11 +01:00
, buildPythonPackage
, fetchFromGitHub
2020-09-26 14:16:11 +01:00
, pythonOlder
, importlib-metadata
, matplotlib
, numpy
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "dufte";
version = "0.2.29";
disabled = pythonOlder "3.6";
2020-09-26 14:16:11 +01:00
src = fetchFromGitHub {
owner = "nschloe";
repo = pname;
2022-01-20 23:55:57 +00:00
rev = "v${version}";
hash = "sha256:0ccsmpj160xj6w503a948aw8icj55mw9414xnmijmmjvlwhm0p48";
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=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
'';
checkInputs = [
pytestCheckHook
];
2021-02-02 12:41:05 +00:00
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 ];
};
}