From 551bd11c42de32a031f980bbbf0f76e2543a0b7f Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sun, 10 Nov 2024 19:36:10 +0800 Subject: [PATCH] python312Packages.pyftgl: refactor and modenize --- pkgs/development/python-modules/pyftgl/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyftgl/default.nix b/pkgs/development/python-modules/pyftgl/default.nix index 76d0bc6804e5..93bfb7a8ec36 100644 --- a/pkgs/development/python-modules/pyftgl/default.nix +++ b/pkgs/development/python-modules/pyftgl/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchFromGitHub, stdenv, + setuptools, boost, freetype, ftgl, @@ -12,14 +13,12 @@ }: let - pythonVersion = with lib.versions; "${major python.version}${minor python.version}"; in - buildPythonPackage rec { pname = "pyftgl"; version = "0.4b"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "umlaeute"; @@ -28,9 +27,12 @@ buildPythonPackage rec { sha256 = "sha256-mbzXpIPMNe6wfwaAAw/Ri8xaW6Z6kuNUhFFyzsiW7Is="; }; + build-system = [ setuptools ]; + postPatch = '' - sed -i "s,'boost_python','boost_python${pythonVersion}',g" setup.py + substituteInPlace setup.py \ + --replace-fail boost_python boost_python${pythonVersion} '' + lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_CFLAGS_COMPILE+=" -L$SDKROOT/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries" @@ -44,8 +46,8 @@ buildPythonPackage rec { libGL ]; - meta = with lib; { + meta = { description = "Python bindings for FTGL (FreeType for OpenGL)"; - license = licenses.gpl2Plus; + license = lib.licenses.gpl2Plus; }; }