From e938fbbd1072f8249d9c05a35b014174a4984f94 Mon Sep 17 00:00:00 2001 From: Ambroz Bizjak Date: Wed, 16 Mar 2016 12:58:57 +0100 Subject: [PATCH] wxPython: Fix runtime error due to library dependencies not in RUNPATH. I think what's happening is that the linker automatically adds DT_NEEDED dependencies to some libraries because it finds these libraries are being used directly, but because they're not linked explicitly with -lflags, the gcc wrapper does not add them to RUNPATH. --- pkgs/development/python-modules/wxPython/generic.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/wxPython/generic.nix b/pkgs/development/python-modules/wxPython/generic.nix index 3151dbcfac3d..16c7c1263187 100644 --- a/pkgs/development/python-modules/wxPython/generic.nix +++ b/pkgs/development/python-modules/wxPython/generic.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, python, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl -, version, sha256, wrapPython, setuptools, ... +, version, sha256, wrapPython, setuptools, libX11, ... }: assert wxGTK.unicode; @@ -17,9 +17,11 @@ stdenv.mkDerivation rec { }; pythonPath = [ python setuptools ]; - buildInputs = [ python setuptools pkgconfig wxGTK (wxGTK.gtk) wrapPython ] ++ stdenv.lib.optional openglSupport pyopengl; + buildInputs = [ python setuptools pkgconfig wxGTK (wxGTK.gtk) wrapPython libX11 ] ++ stdenv.lib.optional openglSupport pyopengl; preConfigure = "cd wxPython"; + NIX_LDFLAGS = "-lX11 -lgdk-x11-2.0"; + installPhase = '' ${python.interpreter} setup.py install WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=${if openglSupport then "1" else "0"} UNICODE=1 --prefix=$out wrapPythonPrograms