about summary refs log tree commit diff
path: root/pkgs/development/python-modules/wxPython
diff options
context:
space:
mode:
authorAmbroz Bizjak <ambrop7@gmail.com>2016-03-16 12:58:57 +0100
committerAmbroz Bizjak <ambrop7@gmail.com>2016-03-16 13:13:20 +0100
commite938fbbd1072f8249d9c05a35b014174a4984f94 (patch)
treefbd2bb2ec929006d11b8e2da069f8682f60615b2 /pkgs/development/python-modules/wxPython
parentdca9630faeff72334c91abd9e213707990ab997a (diff)
downloadnixlib-e938fbbd1072f8249d9c05a35b014174a4984f94.tar
nixlib-e938fbbd1072f8249d9c05a35b014174a4984f94.tar.gz
nixlib-e938fbbd1072f8249d9c05a35b014174a4984f94.tar.bz2
nixlib-e938fbbd1072f8249d9c05a35b014174a4984f94.tar.lz
nixlib-e938fbbd1072f8249d9c05a35b014174a4984f94.tar.xz
nixlib-e938fbbd1072f8249d9c05a35b014174a4984f94.tar.zst
nixlib-e938fbbd1072f8249d9c05a35b014174a4984f94.zip
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.
Diffstat (limited to 'pkgs/development/python-modules/wxPython')
-rw-r--r--pkgs/development/python-modules/wxPython/generic.nix6
1 files 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