From 4e07fbc1ffe53d41c0f6c3378198b87d4140fb38 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 18 Aug 2023 20:05:26 +0200 Subject: [PATCH 1/4] python311Packages.moderngl-window: update meta --- .../python-modules/moderngl_window/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/moderngl_window/default.nix b/pkgs/development/python-modules/moderngl_window/default.nix index e2d498bc4215..2ff609058a9e 100644 --- a/pkgs/development/python-modules/moderngl_window/default.nix +++ b/pkgs/development/python-modules/moderngl_window/default.nix @@ -1,5 +1,5 @@ -{ stdenv -, lib +{ lib +, stdenv , buildPythonPackage , fetchFromGitHub , isPy3k @@ -32,11 +32,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "moderngl_window" ]; meta = with lib; { - homepage = "https://github.com/moderngl/moderngl_window"; description = "Cross platform helper library for ModernGL making window creation and resource loading simple"; + homepage = "https://github.com/moderngl/moderngl-window"; + changelog = "https://github.com/moderngl/moderngl-window/blob/${version}/CHANGELOG.md"; license = licenses.mit; - broken = stdenv.isDarwin; # darwin build breaks - platforms = platforms.mesaPlatforms; maintainers = with maintainers; [ c0deaddict ]; + platforms = platforms.mesaPlatforms; + broken = stdenv.isDarwin; # darwin build breaks }; } From b140d4c30cb77ef52caea03abfe283351d1c73bc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 18 Aug 2023 20:07:19 +0200 Subject: [PATCH 2/4] python311Packages.moderngl-window: disable on unsupported Python releases - add format --- .../python-modules/moderngl_window/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/moderngl_window/default.nix b/pkgs/development/python-modules/moderngl_window/default.nix index 2ff609058a9e..b83f91671a74 100644 --- a/pkgs/development/python-modules/moderngl_window/default.nix +++ b/pkgs/development/python-modules/moderngl_window/default.nix @@ -14,6 +14,9 @@ buildPythonPackage rec { pname = "moderngl-window"; version = "2.4.4"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "moderngl"; @@ -24,12 +27,12 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy moderngl pyglet pillow pyrr glcontext ]; - disabled = !isPy3k; - # Tests need a display to run. doCheck = false; - pythonImportsCheck = [ "moderngl_window" ]; + pythonImportsCheck = [ + "moderngl_window" + ]; meta = with lib; { description = "Cross platform helper library for ModernGL making window creation and resource loading simple"; From 28363237c515dad8834523315b4c0d9f181f482b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 18 Aug 2023 20:12:46 +0200 Subject: [PATCH 3/4] python311Packages.moderngl-window: add optional-dependencies --- .../moderngl_window/default.nix | 46 ++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/moderngl_window/default.nix b/pkgs/development/python-modules/moderngl_window/default.nix index b83f91671a74..a304e7027047 100644 --- a/pkgs/development/python-modules/moderngl_window/default.nix +++ b/pkgs/development/python-modules/moderngl_window/default.nix @@ -1,14 +1,20 @@ { lib -, stdenv , buildPythonPackage , fetchFromGitHub -, isPy3k -, numpy +, glfw , moderngl -, pyglet +, numpy , pillow +, pygame +, pyglet +, pyqt5 , pyrr -, glcontext +, pysdl2 +, pyside2 +, pythonOlder +, scipy +, stdenv +, trimesh }: buildPythonPackage rec { @@ -25,7 +31,35 @@ buildPythonPackage rec { hash = "sha256-mg3j5ZoMwdk39L5xjcoEJo9buqssM1VLJtndSFsuCB0="; }; - propagatedBuildInputs = [ numpy moderngl pyglet pillow pyrr glcontext ]; + propagatedBuildInputs = [ + numpy + moderngl + pyglet + pillow + pyrr + ]; + + passthru.optional-dependencies = { + trimesh = [ + trimesh + scipy + ]; + glfw = [ + glfw + ]; + pygame = [ + pygame + ]; + PySDL2 = [ + pysdl2 + ]; + PySide2 = [ + pyside2 + ]; + pyqt5 = [ + pyqt5 + ]; + }; # Tests need a display to run. doCheck = false; From 81604694bd98d9623145653eb7b94e77c8826d95 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 18 Aug 2023 20:22:43 +0200 Subject: [PATCH 4/4] python311Packages.moderngl-window: mark as broken for Pillow > 10 --- pkgs/development/python-modules/moderngl_window/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/moderngl_window/default.nix b/pkgs/development/python-modules/moderngl_window/default.nix index a304e7027047..31d76131c2ba 100644 --- a/pkgs/development/python-modules/moderngl_window/default.nix +++ b/pkgs/development/python-modules/moderngl_window/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , glfw @@ -13,7 +14,6 @@ , pyside2 , pythonOlder , scipy -, stdenv , trimesh }: @@ -75,6 +75,6 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ c0deaddict ]; platforms = platforms.mesaPlatforms; - broken = stdenv.isDarwin; # darwin build breaks + broken = versionAtLeast pillow.version "2" || stdenv.isDarwin; }; }