From eb8a4b0917a38479708873584a6ca34d5993f096 Mon Sep 17 00:00:00 2001 From: euxane Date: Thu, 16 Jan 2025 18:03:31 +0100 Subject: [PATCH 1/4] python3Packages.sixelcrop: init at 0.1.9 Co-authored-by: renesat --- .../python-modules/sixelcrop/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/sixelcrop/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f7d5d702dbad..b309d67c0776 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -16740,6 +16740,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 { }; From 1fe43afee2cb3f0ab767b10b72eb25d5597aa00e Mon Sep 17 00:00:00 2001 From: euxane Date: Thu, 16 Jan 2025 18:09:07 +0100 Subject: [PATCH 2/4] python3Packages.timg: init at 1.6.1 Co-authored-by: renesat --- .../python-modules/timg/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/timg/default.nix 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 b309d67c0776..c5c0893d2ca6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18260,6 +18260,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 { }; From 8432ab232e64d1cb33f88b773a8aa2e3191f08dd Mon Sep 17 00:00:00 2001 From: euxane Date: Thu, 16 Jan 2025 18:16:30 +0100 Subject: [PATCH 3/4] python3Packages.flatlatex: init at 0.15 Co-authored-by: renesat Co-authored-by: Aleksana --- .../python-modules/flatlatex/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/flatlatex/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c5c0893d2ca6..8a2e7f00337b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5355,6 +5355,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 { }; From 943fa98bf79a681ec1604d4f98cc6ba427f2d261 Mon Sep 17 00:00:00 2001 From: euxane Date: Thu, 16 Jan 2025 18:38:17 +0100 Subject: [PATCH 4/4] python3Packages.euporie: init at 2.8.13 This package is added as a Python module so that its ipykernel can access other modules defined within a common environment. The TUI notebook app can be tested with: nix-shell \ -I nixpkgs=./ \ -p "python3.withPackages(ps: with ps; [ euporie ])" \ --command euporie-notebook Co-authored-by: renesat GitHub: closes https://github.com/NixOS/nixpkgs/issues/374033 --- .../python-modules/euporie/default.nix | 116 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 118 insertions(+) create mode 100644 pkgs/development/python-modules/euporie/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8a2e7f00337b..19bc5871969a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4805,6 +4805,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 { };