diff --git a/pkgs/development/python-modules/plotille/default.nix b/pkgs/development/python-modules/plotille/default.nix new file mode 100644 index 000000000000..48ffcf7156c5 --- /dev/null +++ b/pkgs/development/python-modules/plotille/default.nix @@ -0,0 +1,66 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + poetry-core, + setuptools, + mock, + pendulum, + pytestCheckHook, + pytest-cov-stub, + pytest-mock, +}: + +buildPythonPackage rec { + pname = "plotille"; + version = "5.0.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tammoippen"; + repo = "plotille"; + tag = "v${version}"; + hash = "sha256-P2qwd935aaYgwLAKpTA2OAuohxVVzKwzYqjsuPSOSHs="; + }; + + patches = [ + # To remove when PR https://github.com/tammoippen/plotille/pull/63 has landed + (fetchpatch { + name = "add-build-information"; + url = "https://github.com/tammoippen/plotille/commit/db744e1fa9c141290966476ddf22a5e7d9a00c0a.patch"; + hash = "sha256-8vBVKrcH7R1d9ol3D7RLVtAzZbpMsB9rA1KHD7t3Ydc="; + }) + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail poetry.masonry.api poetry.core.masonry.api \ + --replace-fail "poetry>=" "poetry-core>=" + ''; + + build-system = [ + poetry-core + setuptools + ]; + + pythonImportsCheck = [ + "plotille" + ]; + + nativeCheckInputs = [ + mock + pendulum + pytestCheckHook + pytest-cov-stub + pytest-mock + ]; + + meta = { + changelog = "https://github.com/tammoippen/plotille/releases/tag/v${version}"; + description = "Plot in the terminal using braille dots"; + homepage = "https://github.com/tammoippen/plotille"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 12fd90e184fd..51bce94ab387 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11100,6 +11100,8 @@ self: super: with self; { ploomber-extension = callPackage ../development/python-modules/ploomber-extension { }; + plotille = callPackage ../development/python-modules/plotille { }; + plotext = callPackage ../development/python-modules/plotext { }; plotly = callPackage ../development/python-modules/plotly { };