pyqt: Fix darwin build

This commit is contained in:
Josef Kemetmueller 2016-08-25 19:03:15 +02:00
parent 717c76716f
commit d12de90e1c

View File

@ -1,4 +1,4 @@
{ lib, fetchurl, pythonPackages, qt4, pkgconfig, lndir, dbus_libs, makeWrapper }:
{ stdenv, fetchurl, pythonPackages, qt4, pkgconfig, lndir, dbus_libs, makeWrapper }:
let
version = "4.11.3";
@ -17,9 +17,15 @@ in mkPythonDerivation {
rm -rf "$out/nix-support"
export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages
${stdenv.lib.optionalString stdenv.isDarwin ''
export QMAKESPEC="unsupported/macx-clang-libc++" # OS X target after bootstrapping phase \
''}
substituteInPlace configure.py \
--replace 'install_dir=pydbusmoddir' "install_dir='$out/lib/${python.libPrefix}/site-packages/dbus/mainloop'"
--replace 'install_dir=pydbusmoddir' "install_dir='$out/lib/${python.libPrefix}/site-packages/dbus/mainloop'" \
${stdenv.lib.optionalString stdenv.isDarwin ''
--replace "qt_macx_spec = 'macx-g++'" "qt_macx_spec = 'unsupported/macx-clang-libc++'" # for bootstrapping phase \
''}
configureFlagsArray=( \
--confirm-license --bindir $out/bin \
@ -50,7 +56,7 @@ in mkPythonDerivation {
description = "Python bindings for Qt";
license = "GPL";
homepage = http://www.riverbankcomputing.co.uk;
maintainers = [ lib.maintainers.sander ];
platforms = lib.platforms.mesaPlatforms;
maintainers = [ stdenv.lib.maintainers.sander ];
platforms = stdenv.lib.platforms.mesaPlatforms;
};
}