summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyftgl
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-09-23 22:39:21 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-09-23 22:39:21 +0200
commit5ad7aedf63fd7111699b92c2ea5546027e22d35a (patch)
treed80bd3950e7d0c4fde8bf4378fb6a45ef57c71c0 /pkgs/development/python-modules/pyftgl
parent540e9726b3fad06f73433224d6010cf7734beb80 (diff)
downloadnixpkgs-5ad7aedf63fd7111699b92c2ea5546027e22d35a.tar
nixpkgs-5ad7aedf63fd7111699b92c2ea5546027e22d35a.tar.gz
nixpkgs-5ad7aedf63fd7111699b92c2ea5546027e22d35a.tar.bz2
nixpkgs-5ad7aedf63fd7111699b92c2ea5546027e22d35a.tar.lz
nixpkgs-5ad7aedf63fd7111699b92c2ea5546027e22d35a.tar.xz
nixpkgs-5ad7aedf63fd7111699b92c2ea5546027e22d35a.tar.zst
nixpkgs-5ad7aedf63fd7111699b92c2ea5546027e22d35a.zip
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
Diffstat (limited to 'pkgs/development/python-modules/pyftgl')
-rw-r--r--pkgs/development/python-modules/pyftgl/default.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/pyftgl/default.nix b/pkgs/development/python-modules/pyftgl/default.nix
index a8583747225..1163f007b09 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;
   };