diff --git a/pkgs/development/python-modules/dufte/default.nix b/pkgs/development/python-modules/dufte/default.nix new file mode 100644 index 000000000000..8fe202592359 --- /dev/null +++ b/pkgs/development/python-modules/dufte/default.nix @@ -0,0 +1,44 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +, pythonOlder +, importlib-metadata +, matplotlib +, numpy +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "dufte"; + version = "0.2.9"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "0nkaczipbsm8c14j9svxry2wigmn5iharibb6b8g062sjaph8x17"; + }; + format = "pyproject"; + + propagatedBuildInputs = [ + matplotlib + numpy + ] ++ stdenv.lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; + + preCheck = '' + export HOME=$TMPDIR + mkdir -p $HOME/.matplotlib + echo "backend: ps" > $HOME/.matplotlib/matplotlibrc + ''; + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "dufte" ]; + + meta = with stdenv.lib; { + description = "Clean matplotlib plots"; + homepage = "https://github.com/nschloe/dufte"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ris ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c334f9ab1a3b..59b7c2be0935 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1815,6 +1815,8 @@ in { duecredit = callPackage ../development/python-modules/duecredit { }; + dufte = callPackage ../development/python-modules/dufte { }; + dugong = callPackage ../development/python-modules/dugong { }; dulwich = if isPy3k then