From 4fd85a0e1980deb667f53cb5421d56b02ef8b5b8 Mon Sep 17 00:00:00 2001 From: Alexis Praga Date: Thu, 13 Feb 2025 22:44:13 +0100 Subject: [PATCH 1/2] python312Packages.colormath2: init at 3.0.3 This is a fork of python312Packages.colormath2 that is unmaintained. --- .../python-modules/colormath2/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/colormath2/default.nix diff --git a/pkgs/development/python-modules/colormath2/default.nix b/pkgs/development/python-modules/colormath2/default.nix new file mode 100644 index 000000000000..30f081f8cb62 --- /dev/null +++ b/pkgs/development/python-modules/colormath2/default.nix @@ -0,0 +1,41 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + networkx, + numpy, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "colormath2"; + version = "3.0.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "bkmgit"; + repo = "python-colormath2"; + tag = version; + hash = "sha256-G8b0L8A2RzbVQFPNg2fuBklqTNjo3yqvek/+GnqtsHc="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + networkx + numpy + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "colormath2" ]; + + meta = { + description = "Color math and conversion library (fork)"; + homepage = "https://github.com/bkmgit/python-colormath2"; + changelog = "https://github.com/bkmgit/python-colormath2/releases/tag/${version}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ apraga ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b634be25d594..fd1daec9f2ed 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2560,6 +2560,8 @@ self: super: with self; { colormath = callPackage ../development/python-modules/colormath { }; + colormath2 = callPackage ../development/python-modules/colormath2 { }; + colorspacious = callPackage ../development/python-modules/colorspacious { }; colorthief = callPackage ../development/python-modules/colorthief { }; From b872d76484b1c3c24616e909c340433ff01682c9 Mon Sep 17 00:00:00 2001 From: Alexis Praga Date: Thu, 13 Feb 2025 23:00:39 +0100 Subject: [PATCH 2/2] python312Packages.spectra: 0.0.11 -> 0.1.0 Main change : colormath -> colormath2 --- .../python-modules/spectra/default.nix | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/spectra/default.nix b/pkgs/development/python-modules/spectra/default.nix index f07c17a3bd16..8090bd49dd1f 100644 --- a/pkgs/development/python-modules/spectra/default.nix +++ b/pkgs/development/python-modules/spectra/default.nix @@ -1,40 +1,29 @@ { - buildPythonPackage, - colormath, - fetchFromGitHub, - fetchpatch2, lib, - pytestCheckHook, + buildPythonPackage, + fetchFromGitHub, setuptools, + colormath2, + pytestCheckHook, }: buildPythonPackage rec { pname = "spectra"; - version = "0.0.11"; + version = "0.1.0"; pyproject = true; src = fetchFromGitHub { owner = "jsvine"; repo = "spectra"; tag = "v${version}"; - hash = "sha256-4A2TWTxYqckJ3DX5cd2KN3KXcmO/lQdXmOEnGi76RsA="; + hash = "sha256-PS5p9IR3v6+Up5Fcq8mhkprVgXigD6PZUF4/6hbv7NI="; }; - patches = [ - # https://github.com/jsvine/spectra/pull/21 - (fetchpatch2 { - name = "nose-to-pytest.patch"; - url = "https://github.com/jsvine/spectra/commit/50037aba16dac4bf0fb7ffbd787d0e6b906e8a4b.patch"; - hash = "sha256-cMoIbjRwcZjvhiIOcJR7NmIAOaqpr/e5eh9+sPGKqos="; - excludes = [ ".github/*" ]; - }) - ]; - build-system = [ setuptools ]; - propagatedBuildInputs = [ colormath ]; + dependencies = [ colormath2 ]; nativeCheckInputs = [ pytestCheckHook