From b7819e38c4a7487a0d09bdf64275a246bf29a8e2 Mon Sep 17 00:00:00 2001 From: Josef Kemetmueller Date: Fri, 26 Aug 2016 23:12:24 +0200 Subject: python3.x: Patch extra stack size on darwin Compiling python with "-Wl,-stack_size,1000000" causes problems when compiling for example pygobject3. pygobject3 uses "python3.x-config --ldflags" during installation and then fails when "-Wl,-stack_size,1000000" is present. Maybe we should investigate removing this during the build of pyobject3, but this stack_size flag is also not used on the popular darwin homebrew-core channel for python3.5, so it seems safe to remove it. --- pkgs/development/interpreters/python/cpython/3.4/default.nix | 1 + pkgs/development/interpreters/python/cpython/3.5/default.nix | 1 + pkgs/development/interpreters/python/cpython/3.6/default.nix | 1 + 3 files changed, 3 insertions(+) (limited to 'pkgs/development') diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix index 2293e6d485a9..2e7d3a03141e 100644 --- a/pkgs/development/interpreters/python/cpython/3.4/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix @@ -60,6 +60,7 @@ stdenv.mkDerivation { prePatch = optionalString stdenv.isDarwin '' substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' + substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' ' ''; preConfigure = '' diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix index 1b6814ea4363..69d3df32a326 100644 --- a/pkgs/development/interpreters/python/cpython/3.5/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix @@ -57,6 +57,7 @@ stdenv.mkDerivation { prePatch = optionalString stdenv.isDarwin '' substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' + substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' ' ''; preConfigure = '' diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index 2c1846442070..3a6635cd8b62 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -61,6 +61,7 @@ stdenv.mkDerivation { prePatch = optionalString stdenv.isDarwin '' substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' + substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' ' ''; preConfigure = '' -- cgit 1.4.1 From 717c76716fb839eca7cddf25a391a3a336702a04 Mon Sep 17 00:00:00 2001 From: Josef Kemetmueller Date: Fri, 26 Aug 2016 23:18:32 +0200 Subject: pygobject3: Add missing dependencies (for darwin) The packages "which" and "ncurses" are needed for building pygobject3 (on darwin) during the checkPhase. The ncurses library is necessary only because python3.5 is currently built using "-lncurses" and pygobject3 wants the same libraries that python3.5 was compiled with. (Because it uses "python3.5-config --ldflags" during the build) --- pkgs/development/python-modules/pygobject/3.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index 43882476b9d5..797d89fd4822 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, mkPythonDerivation, python, pkgconfig, glib, gobjectIntrospection, pycairo, cairo }: +{ stdenv, fetchurl, mkPythonDerivation, python, pkgconfig, glib, gobjectIntrospection, pycairo, cairo, which, ncurses}: mkPythonDerivation rec { major = "3.20"; @@ -10,12 +10,13 @@ mkPythonDerivation rec { sha256 = "0ikzh3l7g1gjh8jj8vg6mdvrb25svp63gxcam4m0i404yh0lgari"; }; - buildInputs = [ pkgconfig glib gobjectIntrospection ]; + buildInputs = [ pkgconfig glib gobjectIntrospection ] + ++ stdenv.lib.optionals stdenv.isDarwin [ which ncurses ]; propagatedBuildInputs = [ pycairo cairo ]; meta = { homepage = http://live.gnome.org/PyGObject; description = "Python bindings for Glib"; - platforms = lib.platforms.unix; + platforms = stdenv.lib.platforms.unix; }; } -- cgit 1.4.1 From d12de90e1c0cece5b7a92cd66af19e12b9fb6a81 Mon Sep 17 00:00:00 2001 From: Josef Kemetmueller Date: Thu, 25 Aug 2016 19:03:15 +0200 Subject: pyqt: Fix darwin build --- pkgs/development/python-modules/pyqt/4.x.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix index 5ffbd19228cf..d3f2e37df884 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; }; } -- cgit 1.4.1