From dca6628d1a8f939527b31413bfb64d2249d5f842 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sat, 1 Dec 2018 22:06:23 +0100 Subject: [PATCH] pythonPackages.matplotlib: enable tk backend by default We currently do not build mathplotlib with any backend. This can be very confusing for users. They will try to use matplotlib and it will simply display nothing (see #51337). We should ship at least one backend. `tk` was chosen somewhat arbitrarily. The gtk backend is problematic (see https://github.com/NixOS/nixpkgs/issues/50959#issuecomment-441327767) so tkinter seems like a good choice. There is already a backend provided on darwin so there is no reason to include tk there. --- pkgs/development/python-modules/matplotlib/2.nix | 3 ++- pkgs/development/python-modules/matplotlib/default.nix | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/matplotlib/2.nix b/pkgs/development/python-modules/matplotlib/2.nix index f073e7baa4ed..7626959b4728 100644 --- a/pkgs/development/python-modules/matplotlib/2.nix +++ b/pkgs/development/python-modules/matplotlib/2.nix @@ -4,7 +4,8 @@ , enableGhostscript ? false, ghostscript ? null, gtk3 , enableGtk2 ? false, pygtk ? null, gobjectIntrospection , enableGtk3 ? false, cairo -, enableTk ? false, tcl ? null, tk ? null, tkinter ? null, libX11 ? null +# darwin has its own "MacOSX" backend +, enableTk ? !stdenv.isDarwin, tcl ? null, tk ? null, tkinter ? null, libX11 ? null , enableQt ? false, pyqt4 , libcxx , Cocoa diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index 2cd7557bac7c..1251fabf7aab 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -4,7 +4,8 @@ , enableGhostscript ? true, ghostscript ? null, gtk3 , enableGtk2 ? false, pygtk ? null, gobjectIntrospection , enableGtk3 ? false, cairo -, enableTk ? false, tcl ? null, tk ? null, tkinter ? null, libX11 ? null +# darwin has its own "MacOSX" backend +, enableTk ? !stdenv.isDarwin, tcl ? null, tk ? null, tkinter ? null, libX11 ? null , enableQt ? false, pyqt4 , libcxx , Cocoa