diff --git a/pkgs/development/python-modules/drawille/default.nix b/pkgs/development/python-modules/drawille/default.nix new file mode 100644 index 000000000000..a00b0b16892b --- /dev/null +++ b/pkgs/development/python-modules/drawille/default.nix @@ -0,0 +1,30 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "drawille"; + version = "0.1.0"; + + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-t4nS8TWbEGKHibIbLfZZycPQxTiEzuJ7DYsa6Twi+8s="; + }; + + doCheck = false; # pypi package has no tests, git has no tags + + pythonImportsCheck = [ + "drawille" + ]; + + meta = with lib; { + description = "Drawing in terminal with unicode braille characters"; + homepage = "https://github.com/asciimoo/drawille"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ nobbz ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/python-modules/drawilleplot/default.nix b/pkgs/development/python-modules/drawilleplot/default.nix new file mode 100644 index 000000000000..1ed452c1d109 --- /dev/null +++ b/pkgs/development/python-modules/drawilleplot/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, drawille +, matplotlib +}: + +buildPythonPackage rec { + pname = "drawilleplot"; + version = "0.1.0"; + + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-ZEDroo7KkI2VxdESb2QDX+dPY4UahuuK9L0EddrxJjQ="; + }; + + doCheck = false; # does not have any tests at all + + propagatedBuildInputs = [ + drawille + matplotlib + ]; + + pythonImportsCheck = [ + "drawilleplot" + ]; + + meta = with lib; { + description = "matplotlib backend for graph output in unicode terminals using drawille"; + homepage = "https://github.com/gooofy/drawilleplot"; + license = licenses.asl20; + maintainers = with maintainers; [ nobbz ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/python-modules/hledger-utils/default.nix b/pkgs/development/python-modules/hledger-utils/default.nix new file mode 100644 index 000000000000..58fe5f3e8714 --- /dev/null +++ b/pkgs/development/python-modules/hledger-utils/default.nix @@ -0,0 +1,68 @@ +{ lib +, buildPythonPackage +, fetchFromGitLab +, setuptools +, setuptools-scm +, unittestCheckHook +, hledger +, perl +, rich +, pandas +, scipy +, psutil +, matplotlib +, drawilleplot +, asteval +}: + +buildPythonPackage rec { + pname = "hledger-utils"; + version = "1.12.1"; + + format = "pyproject"; + + src = fetchFromGitLab { + owner = "nobodyinperson"; + repo = "hledger-utils"; + rev = "refs/tags/v${version}"; + hash = "sha256-uAFqBNRET3RaWDTyV53onrBs1fjPR4b5rAvg5lweUN0="; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + propagatedBuildInputs = [ + rich + pandas + scipy + psutil + matplotlib + drawilleplot + asteval + ]; + + checkInputs = [ + unittestCheckHook + ]; + + nativeCheckInputs = [ + hledger + perl + ]; + + preCheck = '' + export PATH=$out/bin:$PATH + ''; + + meta = with lib; { + description = "Utilities extending hledger"; + homepage = "https://gitlab.com/nobodyinperson/hledger-utils"; + license = with licenses; [cc0 cc-by-40 gpl3]; + maintainers = with maintainers; [ nobbz ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5c9a3a7787df..73edda806c12 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29867,6 +29867,7 @@ with pkgs; hledger-interest = haskell.lib.compose.justStaticExecutables haskellPackages.hledger-interest; hledger-ui = haskell.lib.compose.justStaticExecutables haskellPackages.hledger-ui; hledger-web = haskell.lib.compose.justStaticExecutables haskellPackages.hledger-web; + hledger-utils = with python3.pkgs; toPythonApplication hledger-utils; homebank = callPackage ../applications/office/homebank { gtk = gtk3; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ef822a72fb01..d99a60b8b8aa 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2814,6 +2814,10 @@ self: super: with self; { dragonfly = callPackage ../development/python-modules/dragonfly { }; + drawille = callPackage ../development/python-modules/drawille { }; + + drawilleplot = callPackage ../development/python-modules/drawilleplot { }; + dremel3dpy = callPackage ../development/python-modules/dremel3dpy { }; drf-jwt = callPackage ../development/python-modules/drf-jwt { }; @@ -4321,6 +4325,8 @@ self: super: with self; { hkdf = callPackage ../development/python-modules/hkdf { }; + hledger-utils = callPackage ../development/python-modules/hledger-utils { }; + hlk-sw16 = callPackage ../development/python-modules/hlk-sw16 { }; hmmlearn = callPackage ../development/python-modules/hmmlearn { };