summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyqt
diff options
context:
space:
mode:
authorJosef Kemetmueller <josef.kemetmueller@aon.at>2016-08-25 19:03:15 +0200
committerJosef Kemetmueller <josef.kemetmueller@aon.at>2016-09-04 13:02:53 +0200
commitd12de90e1c0cece5b7a92cd66af19e12b9fb6a81 (patch)
tree9380fccb7459b0d5ee53c154a15e73dbdb5bc317 /pkgs/development/python-modules/pyqt
parent717c76716fb839eca7cddf25a391a3a336702a04 (diff)
downloadnixpkgs-d12de90e1c0cece5b7a92cd66af19e12b9fb6a81.tar
nixpkgs-d12de90e1c0cece5b7a92cd66af19e12b9fb6a81.tar.gz
nixpkgs-d12de90e1c0cece5b7a92cd66af19e12b9fb6a81.tar.bz2
nixpkgs-d12de90e1c0cece5b7a92cd66af19e12b9fb6a81.tar.lz
nixpkgs-d12de90e1c0cece5b7a92cd66af19e12b9fb6a81.tar.xz
nixpkgs-d12de90e1c0cece5b7a92cd66af19e12b9fb6a81.tar.zst
nixpkgs-d12de90e1c0cece5b7a92cd66af19e12b9fb6a81.zip
pyqt: Fix darwin build
Diffstat (limited to 'pkgs/development/python-modules/pyqt')
-rw-r--r--pkgs/development/python-modules/pyqt/4.x.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix
index 5ffbd19228c..d3f2e37df88 100644
--- a/pkgs/development/python-modules/pyqt/4.x.nix
+++ b/pkgs/development/python-modules/pyqt/4.x.nix
@@ -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;
   };
 }