From 31579c6b0a643742d6ac6157d002de1e730a83cb Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 9 Sep 2020 12:18:50 -0400 Subject: [PATCH] matplotlib: Disable LTO on darwin. Needs #19312 or equivalent to work. --- pkgs/development/python-modules/matplotlib/default.nix | 2 +- .../development/python-modules/matplotlib/setup-darwin.cfg | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/matplotlib/setup-darwin.cfg diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index 45f317397467..732a6c89f439 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { ++ stdenv.lib.optionals enableTk [ tcl tk tkinter libX11 ] ++ stdenv.lib.optionals enableQt [ pyqt5 ]; - setup_cfg = ./setup.cfg; + setup_cfg = if stdenv.isDarwin then ./setup-darwin.cfg else ./setup.cfg; preBuild = '' cp "$setup_cfg" ./setup.cfg ''; diff --git a/pkgs/development/python-modules/matplotlib/setup-darwin.cfg b/pkgs/development/python-modules/matplotlib/setup-darwin.cfg new file mode 100644 index 000000000000..f6463d9c574a --- /dev/null +++ b/pkgs/development/python-modules/matplotlib/setup-darwin.cfg @@ -0,0 +1,7 @@ +[directories] +basedirlist = . + +[libs] +system_freetype = true +# LTO not working in darwin stdenv, see #19312 +enable_lto = false