From 332a06e011fe738f261b655602da62df793b7237 Mon Sep 17 00:00:00 2001 From: Norbert Melzer Date: Mon, 23 Jan 2023 23:20:49 +0100 Subject: [PATCH 1/3] pythonPackages.drawille: init at 0.1.0 --- .../python-modules/drawille/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/drawille/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 94ed8a184db9..dfcd4127b3fb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2814,6 +2814,8 @@ self: super: with self; { dragonfly = callPackage ../development/python-modules/dragonfly { }; + drawille = callPackage ../development/python-modules/drawille { }; + dremel3dpy = callPackage ../development/python-modules/dremel3dpy { }; drf-jwt = callPackage ../development/python-modules/drf-jwt { }; From ac3d289481a3d4519cfce58a3a56d630416dbbcf Mon Sep 17 00:00:00 2001 From: Norbert Melzer Date: Tue, 24 Jan 2023 08:49:45 +0100 Subject: [PATCH 2/3] pythonPackages.drawilleplot: init at 0.1.0 --- .../python-modules/drawilleplot/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/drawilleplot/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dfcd4127b3fb..ed5abdbd50c8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2816,6 +2816,8 @@ self: super: with self; { 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 { }; From ac47db290b0600c64649d19dea8aa0ca5b3bd2e7 Mon Sep 17 00:00:00 2001 From: Norbert Melzer Date: Tue, 24 Jan 2023 11:14:21 +0100 Subject: [PATCH 3/3] hledger-utils: init at 1.12.1 --- .../python-modules/hledger-utils/default.nix | 68 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 71 insertions(+) create mode 100644 pkgs/development/python-modules/hledger-utils/default.nix 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 bf00bf10fc8b..d58b4e4c5687 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29831,6 +29831,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 ed5abdbd50c8..81a7953e44f7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4319,6 +4319,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 { };