From b796d5b3bac766f755cd9af33b0dc006e047ed05 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Oct 2022 09:58:07 +0200 Subject: [PATCH] python310Packages.moderngl: disable on older Python releases - add pythonImportsCheck --- .../python-modules/moderngl/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/moderngl/default.nix b/pkgs/development/python-modules/moderngl/default.nix index 1d2c10da482f..5f8f42fc781e 100644 --- a/pkgs/development/python-modules/moderngl/default.nix +++ b/pkgs/development/python-modules/moderngl/default.nix @@ -1,34 +1,46 @@ { lib , buildPythonPackage , fetchPypi -, isPy3k , libGL , libX11 , glcontext +, pythonOlder }: buildPythonPackage rec { pname = "moderngl"; version = "5.7.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-NDTZ4comjJY/dEvrTdxHR88fQ1lZU2zSWZ43f7YqvT8="; + hash = "sha256-NDTZ4comjJY/dEvrTdxHR88fQ1lZU2zSWZ43f7YqvT8="; }; - disabled = !isPy3k; + buildInputs = [ + libGL + libX11 + ]; - buildInputs = [ libGL libX11 ]; - propagatedBuildInputs = [ glcontext ]; + propagatedBuildInputs = [ + glcontext + ]; # Tests need a display to run. doCheck = false; + pythonImportsCheck = [ + "moderngl" + ]; + meta = with lib; { + description = "High performance rendering for Python"; homepage = "https://github.com/moderngl/moderngl"; - description = "High performance rendering for Python 3"; license = licenses.mit; - platforms = platforms.linux; # should be mesaPlatforms, darwin build breaks. maintainers = with maintainers; [ c0deaddict ]; + # should be mesaPlatforms, darwin build breaks. + platforms = platforms.linux; }; }