about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorJohannes Jöns2024-08-11 16:12:34 +0200
committerGitHub2024-08-11 16:12:34 +0200
commit00704ea7b4ab6245ba02be99d334d2cfadb1b3df (patch)
treea41725ddb0f926ef254794aa7b78cee9c3ffdd48 /pkgs/development
parentcff74769bf097a64813f8b38d134c59b483acd30 (diff)
parentc9490230ad2a36d7f4b7c4a8872f5bb92399eba1 (diff)
Merge pull request #333720 from DontEatOreo/source-customtkinter
customtkinter: build from source
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/customtkinter/0001-Add-Missing-Cfg-Packages.patch15
-rw-r--r--pkgs/development/python-modules/customtkinter/default.nix29
2 files changed, 33 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/customtkinter/0001-Add-Missing-Cfg-Packages.patch b/pkgs/development/python-modules/customtkinter/0001-Add-Missing-Cfg-Packages.patch
new file mode 100644
index 000000000000..29ff126b7ae4
--- /dev/null
+++ b/pkgs/development/python-modules/customtkinter/0001-Add-Missing-Cfg-Packages.patch
@@ -0,0 +1,15 @@
+diff --git a/setup.cfg b/setup.cfg
+index 5f95b7f..9250e4f 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -22,6 +22,10 @@ repository = https://github.com/tomschimansky/customtkinter
+ python_requires = >=3.7
+ packages =
+     customtkinter
++    customtkinter.assets.fonts
++    customtkinter.assets.fonts.Roboto
++    customtkinter.assets.icons
++    customtkinter.assets.themes
+     customtkinter.windows
+     customtkinter.windows.widgets
+     customtkinter.windows.widgets.appearance_mode
diff --git a/pkgs/development/python-modules/customtkinter/default.nix b/pkgs/development/python-modules/customtkinter/default.nix
index 9f4f3a27170b..4cd7d2e85239 100644
--- a/pkgs/development/python-modules/customtkinter/default.nix
+++ b/pkgs/development/python-modules/customtkinter/default.nix
@@ -2,11 +2,12 @@
   lib,
   buildPythonPackage,
   pythonOlder,
-  fetchPypi,
+  fetchFromGitHub,
   setuptools,
-  wheel,
   tkinter,
   darkdetect,
+  packaging,
+  typing-extensions,
 }:
 let
   pname = "customtkinter";
@@ -17,20 +18,26 @@ buildPythonPackage {
   pyproject = true;
   disabled = pythonOlder "3.7";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-/Y2zuvqWHJgu5gMNuoC0wuJYWGMHVrUTmG2xkRPY0gc=";
+  src = fetchFromGitHub {
+    owner = "TomSchimansky";
+    repo = "CustomTkinter";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-1g2wdXbUv5xNnpflFLXvU39s16kmwvuegKWd91E3qm4=";
   };
 
-  nativeBuildInputs = [
+  build-system = [
     setuptools
-    wheel
+    tkinter
   ];
-  buildInputs = [ tkinter ];
-  propagatedBuildInputs = [ darkdetect ];
 
-  # No tests
-  doCheck = false;
+  dependencies = [
+    darkdetect
+    packaging
+    typing-extensions
+  ];
+
+  patches = [ ./0001-Add-Missing-Cfg-Packages.patch ];
+
   pythonImportsCheck = [ "customtkinter" ];
 
   meta = {