From 7eb0b20918c8e15dfb7177250df1244a997ae4a2 Mon Sep 17 00:00:00 2001 From: Bert Moens Date: Wed, 13 Dec 2017 21:01:06 +0100 Subject: [PATCH] wxPython: enable headers Headers were disabled, probably because they caused a build error: the header files were being copied to the store path of wxwidgets, but it failed with permission denied. With this commit, the header files stay in the wxPython store path. To point the builder of another derivation to the wxPython header files, some tweaking is needed. E.g. for kicad: cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-I${wxPython}/include/wx-3.0" ] --- pkgs/development/python-modules/wxPython/3.0.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/wxPython/3.0.nix b/pkgs/development/python-modules/wxPython/3.0.nix index ab7b44019c54..abce4cf44e0c 100644 --- a/pkgs/development/python-modules/wxPython/3.0.nix +++ b/pkgs/development/python-modules/wxPython/3.0.nix @@ -43,6 +43,9 @@ buildPythonPackage rec { # remove wxPython's darwin hack that interference with python-2.7-distutils-C++.patch substituteInPlace config.py \ --replace "distutils.unixccompiler.UnixCCompiler = MyUnixCCompiler" "" + # set the WXPREFIX to $out instead of the storepath of wxwidgets + substituteInPlace config.py \ + --replace "WXPREFIX = getWxConfigValue('--prefix')" "WXPREFIX = '$out'" # this check is supposed to only return false on older systems running non-framework python substituteInPlace src/osx_cocoa/_core_wrap.cpp \ --replace "return wxPyTestDisplayAvailable();" "return true;" @@ -62,7 +65,7 @@ buildPythonPackage rec { buildPhase = ""; installPhase = '' - ${python.interpreter} setup.py install WXPORT=${if stdenv.isDarwin then "osx_cocoa" else "gtk2"} NO_HEADERS=1 BUILD_GLCANVAS=${if openglSupport then "1" else "0"} UNICODE=1 --prefix=$out + ${python.interpreter} setup.py install WXPORT=${if stdenv.isDarwin then "osx_cocoa" else "gtk2"} NO_HEADERS=0 BUILD_GLCANVAS=${if openglSupport then "1" else "0"} UNICODE=1 --prefix=$out wrapPythonPrograms '';