pythonPackages.pyftgl: fix build (#47232)

See https://hydra.nixos.org/build/80705583

Recent `boost` versions with `python` enabled have changed their naming
scheme for `boost_python` shared objects which causes issues with the
proper linking when building `pyftgl`.

Previously the library was named `boost_python3`, no it's named
`boost_python36` for current python (3.6.x).

The same issue applies for the `python2`.

Addresses #45960
This commit is contained in:
Maximilian Bosch 2018-09-23 22:39:21 +02:00 committed by xeji
parent 540e9726b3
commit 5ad7aedf63

View File

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