From 4eed74534362195ee11935d8fa4c983d320cc24a Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 16 Aug 2023 15:57:05 -0400 Subject: [PATCH 1/3] python310Packages.ochre: init at 0.4.0 https://github.com/getcuia/ochre --- .../python-modules/ochre/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/ochre/default.nix diff --git a/pkgs/development/python-modules/ochre/default.nix b/pkgs/development/python-modules/ochre/default.nix new file mode 100644 index 000000000000..e3604446e7e2 --- /dev/null +++ b/pkgs/development/python-modules/ochre/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, hypothesis +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "ochre"; + version = "0.4.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "getcuia"; + repo = "ochre"; + rev = "v${version}"; + hash = "sha256-U6qycLnldwNze3XMAn6DS3XGX4RaCZgW0pH/y/FEAkk="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + nativeCheckInputs = [ + hypothesis + pytestCheckHook + ]; + + pythonImportsCheck = [ "ochre" ]; + + meta = with lib; { + description = "A down-to-earth approach to colors"; + homepage = "https://github.com/getcuia/ochre"; + changelog = "https://github.com/getcuia/ochre/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ae5a5da09ff4..d09027eca21d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7289,6 +7289,8 @@ self: super: with self; { oca-port = callPackage ../development/python-modules/oca-port { }; + ochre = callPackage ../development/python-modules/ochre { }; + oci = callPackage ../development/python-modules/oci { }; ocifs = callPackage ../development/python-modules/ocifs { }; From 4acb1154a55540555d3212bfccd8dc4a5c0e5ef9 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 16 Aug 2023 15:54:32 -0400 Subject: [PATCH 2/3] python310Packages.stransi: init at 0.3.0 https://github.com/getcuia/stransi --- .../python-modules/stransi/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/stransi/default.nix diff --git a/pkgs/development/python-modules/stransi/default.nix b/pkgs/development/python-modules/stransi/default.nix new file mode 100644 index 000000000000..5b2802ea1afe --- /dev/null +++ b/pkgs/development/python-modules/stransi/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, hypothesis +, pytestCheckHook +, ochre +}: + +buildPythonPackage rec { + pname = "stransi"; + version = "0.3.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "getcuia"; + repo = "stransi"; + rev = "v${version}"; + hash = "sha256-PDMel6emra5bzX+FwHvUVpFu2YkRKy31UwkCL4sGJ14="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + nativeCheckInputs = [ + hypothesis + pytestCheckHook + ]; + + propagatedBuildInputs = [ + ochre + ]; + + pythonImportsCheck = [ "stransi" ]; + + meta = with lib; { + description = "A lightweight Python parser library for ANSI escape code sequences"; + homepage = "https://github.com/getcuia/stransi"; + changelog = "https://github.com/getcuia/stransi/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d09027eca21d..0b98b22fb523 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12208,6 +12208,8 @@ self: super: with self; { stopit = callPackage ../development/python-modules/stopit { }; + stransi = callPackage ../development/python-modules/stransi { }; + strategies = callPackage ../development/python-modules/strategies { }; stravalib = callPackage ../development/python-modules/stravalib { }; From 7cd096dbc5a582543fc6f7a4c25f5d527153dc14 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 16 Aug 2023 15:52:06 -0400 Subject: [PATCH 3/3] textual-paint: init at 0.1.0 https://github.com/1j01/textual-paint --- .../graphics/textual-paint/default.nix | 79 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 81 insertions(+) create mode 100644 pkgs/applications/graphics/textual-paint/default.nix diff --git a/pkgs/applications/graphics/textual-paint/default.nix b/pkgs/applications/graphics/textual-paint/default.nix new file mode 100644 index 000000000000..89d94d6f4c7e --- /dev/null +++ b/pkgs/applications/graphics/textual-paint/default.nix @@ -0,0 +1,79 @@ +{ lib +, python3 +, fetchFromGitHub +, fetchPypi +, fetchpatch +}: + +let + python = python3.override { + packageOverrides = _: super: { + pillow = super.pillow.overridePythonAttrs rec { + version = "9.5.0"; + format = "pyproject"; + + src = fetchPypi { + pname = "Pillow"; + inherit version; + hash = "sha256-v1SEedM2cm16Ds6252fhefveN4M65CeUYCYxoHDWMPE="; + }; + + patches = [ + # fix type handling for include and lib directories + (fetchpatch { + url = "https://github.com/python-pillow/Pillow/commit/0ec0a89ead648793812e11739e2a5d70738c6be5.patch"; + hash = "sha256-m5R5fLflnbJXbRxFlTjT2X3nKdC05tippMoJUDsJmy0="; + }) + ]; + }; + + textual = super.textual.overridePythonAttrs rec { + version = "0.27.0"; + + src = fetchFromGitHub { + owner = "Textualize"; + repo = "textual"; + rev = "v${version}"; + hash = "sha256-ag+sJFprYW3IpH+BiMR5eSRUFMBeVuOnF6GTTuXGBHw="; + }; + }; + }; + }; +in + +python.pkgs.buildPythonApplication rec { + pname = "textual-paint"; + version = "0.1.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "1j01"; + repo = "textual-paint"; + rev = "v${version}"; + hash = "sha256-ubBWK4aoa9+wyUED7CmWwjknWsWauR/mkurDgkKDiY8="; + }; + + nativeBuildInputs = [ + python.pkgs.setuptools + python.pkgs.wheel + ]; + + propagatedBuildInputs = with python.pkgs; [ + pillow + pyfiglet + pyperclip + rich + stransi + textual + ]; + + pythonImportsCheck = [ "textual_paint" ]; + + meta = with lib; { + description = "A TUI image editor inspired by MS Paint"; + homepage = "https://github.com/1j01/textual-paint"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "textual-paint"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f6b5a8bf8e3f..394bf9a5bf58 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35599,6 +35599,8 @@ with pkgs; tev = callPackage ../applications/graphics/tev { }; + textual-paint = callPackage ../applications/graphics/textual-paint { }; + themechanger = callPackage ../applications/misc/themechanger { }; thinkingRock = callPackage ../applications/misc/thinking-rock { };