diff --git a/pkgs/development/python-modules/pyftgl/default.nix b/pkgs/development/python-modules/pyftgl/default.nix index a85837472255..1163f007b092 100644 --- a/pkgs/development/python-modules/pyftgl/default.nix +++ b/pkgs/development/python-modules/pyftgl/default.nix @@ -1,5 +1,13 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, isPy3k -, boost, freetype, ftgl, libGLU_combined }: +{ lib, buildPythonPackage, fetchFromGitHub, isPy3k +, boost, freetype, ftgl, libGLU_combined +, python +}: + +let + + pythonVersion = with lib.versions; "${major python.version}${minor python.version}"; + +in buildPythonPackage rec { pname = "pyftgl"; @@ -13,13 +21,13 @@ buildPythonPackage rec { sha256 = "12zcjv4cwwjihiaf74kslrdmmk4bs47h7006gyqfwdfchfjdgg4r"; }; - postPatch = stdenv.lib.optional isPy3k '' - sed -i "s,'boost_python','boost_python3',g" setup.py + postPatch = '' + sed -i "s,'boost_python','boost_python${pythonVersion}',g" setup.py ''; buildInputs = [ boost freetype ftgl libGLU_combined ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Python bindings for FTGL (FreeType for OpenGL)"; license = licenses.gpl2Plus; };