diff --git a/pkgs/development/python-modules/euporie/default.nix b/pkgs/development/python-modules/euporie/default.nix new file mode 100644 index 000000000000..1d9ccd3f0a14 --- /dev/null +++ b/pkgs/development/python-modules/euporie/default.nix @@ -0,0 +1,116 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + hatchling, + aenum, + aiohttp, + prompt-toolkit, + pygments, + nbformat, + jupyter-client, + typing-extensions, + fastjsonschema, + platformdirs, + pyperclip, + imagesize, + markdown-it-py, + linkify-it-py, + mdit-py-plugins, + flatlatex, + timg, + pillow, + sixelcrop, + universal-pathlib, + fsspec, + jupytext, + ipykernel, + pytestCheckHook, + pytest-asyncio, + pytest-cov-stub, + python-magic, + html2text, + writableTmpDirAsHomeHook, +}: + +buildPythonPackage rec { + pname = "euporie"; + version = "2.8.13"; + pyproject = true; + + src = fetchFromGitHub { + owner = "joouha"; + repo = "euporie"; + tag = "v${version}"; + hash = "sha256-T+Zec5vb+y5qf7Xvv+QtVG+olnv2C0933tCJbEQAJuU="; + }; + + build-system = [ + setuptools + hatchling + ]; + + dependencies = [ + aenum + aiohttp + prompt-toolkit + pygments + nbformat + jupyter-client + typing-extensions + fastjsonschema + platformdirs + pyperclip + imagesize + markdown-it-py + linkify-it-py + mdit-py-plugins + flatlatex + timg + pillow + sixelcrop + universal-pathlib + fsspec + jupytext + ipykernel + ]; + + pythonRelaxDeps = [ + "aenum" + "linkify-it-py" + "markdown-it-py" + "mdit-py-plugins" + "platformdirs" + ]; + + doCheck = true; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + pytest-cov-stub + python-magic + html2text + writableTmpDirAsHomeHook + ]; + + meta = { + description = "Jupyter notebooks in the terminal"; + longDescription = '' + Similar to `jupyter lab` or `jupyter notebook`, This package + can only be used inside a python environment. To quickly summon + a python environment with euporie, you can use: + ``` + nix-shell -p 'python3.withPackages (ps: with ps; [ euporie ])' + ``` + ''; + homepage = "https://euporie.readthedocs.io/"; + license = lib.licenses.mit; + mainProgram = "euporie"; + maintainers = with lib.maintainers; [ + euxane + renesat + ]; + }; +} diff --git a/pkgs/development/python-modules/flatlatex/default.nix b/pkgs/development/python-modules/flatlatex/default.nix new file mode 100644 index 000000000000..78ae40b72ee6 --- /dev/null +++ b/pkgs/development/python-modules/flatlatex/default.nix @@ -0,0 +1,45 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + pytestCheckHook, + regex, +}: + +buildPythonPackage rec { + pname = "flatlatex"; + version = "0.15"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-UXDhvNT8y1K9vf8wCxS2hzBIO8RvaiqJ964rsCTk0Tk="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + regex + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "flatlatex" + ]; + + meta = { + description = "LaTeX math converter to unicode text"; + homepage = "https://github.com/jb-leger/flatlatex"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ + euxane + renesat + ]; + }; +} diff --git a/pkgs/development/python-modules/sixelcrop/default.nix b/pkgs/development/python-modules/sixelcrop/default.nix new file mode 100644 index 000000000000..7a972ce0618f --- /dev/null +++ b/pkgs/development/python-modules/sixelcrop/default.nix @@ -0,0 +1,35 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + hatchling, +}: + +buildPythonPackage rec { + pname = "sixelcrop"; + version = "0.1.9"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-1sBaxPvW4gH3lK3tEjAPtCdXMXLAVEof0lpIpmpbyG8="; + }; + + build-system = [ + hatchling + ]; + + pythonImportsCheck = [ + "sixelcrop" + ]; + + meta = { + description = "Crop sixel images in sixel-space!"; + homepage = "https://github.com/joouha/sixelcrop"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + euxane + renesat + ]; + }; +} diff --git a/pkgs/development/python-modules/timg/default.nix b/pkgs/development/python-modules/timg/default.nix new file mode 100644 index 000000000000..7e8a3c208846 --- /dev/null +++ b/pkgs/development/python-modules/timg/default.nix @@ -0,0 +1,40 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + pillow, +}: + +buildPythonPackage rec { + pname = "timg"; + version = "1.1.6"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-k42TmsNQIwD3ueParfXaD4jFuG/eWILXO0Op0Ci9S/0="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + pillow + ]; + + pythonImportsCheck = [ + "timg" + ]; + + meta = { + description = "Display an image in terminal"; + homepage = "https://github.com/adzierzanowski/timg"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + euxane + renesat + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5e244bd7b437..59d1335b3327 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4831,6 +4831,8 @@ self: super: with self; { eufylife-ble-client = callPackage ../development/python-modules/eufylife-ble-client { }; + euporie = callPackage ../development/python-modules/euporie { }; + eval-type-backport = callPackage ../development/python-modules/eval-type-backport { }; evaluate = callPackage ../development/python-modules/evaluate { }; @@ -5383,6 +5385,8 @@ self: super: with self; { flatdict = callPackage ../development/python-modules/flatdict { }; + flatlatex = callPackage ../development/python-modules/flatlatex { }; + flatten-dict = callPackage ../development/python-modules/flatten-dict { }; flatten-json = callPackage ../development/python-modules/flatten-json { }; @@ -16828,6 +16832,8 @@ self: super: with self; { sixel = callPackage ../development/python-modules/sixel { }; + sixelcrop = callPackage ../development/python-modules/sixelcrop { }; + sjcl = callPackage ../development/python-modules/sjcl { }; skein = callPackage ../development/python-modules/skein { }; @@ -18349,6 +18355,8 @@ self: super: with self; { timezonefinder = callPackage ../development/python-modules/timezonefinder { }; + timg = callPackage ../development/python-modules/timg { }; + timing-asgi = callPackage ../development/python-modules/timing-asgi { }; timm = callPackage ../development/python-modules/timm { };