From a91161aa57f7cfe447a551bafc2d7c6c6bbbe44b Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 27 Feb 2016 06:16:42 -0600 Subject: [PATCH] nixos: remove qtPlugins and gtkPlugins Both Qt and GTK load plugins from the active profiles automatically, so it is sufficient to install input methods system-wide. Overriding the plugin paths may interfere with correct operation of other plugins. --- nixos/modules/config/gtk-exe-env.nix | 41 ------------------------ nixos/modules/config/qt-plugin-env.nix | 37 --------------------- nixos/modules/i18n/inputMethod/fcitx.nix | 2 -- nixos/modules/i18n/inputMethod/nabi.nix | 1 - nixos/modules/i18n/inputMethod/uim.nix | 2 -- nixos/modules/module-list.nix | 2 -- 6 files changed, 85 deletions(-) delete mode 100644 nixos/modules/config/gtk-exe-env.nix delete mode 100644 nixos/modules/config/qt-plugin-env.nix diff --git a/nixos/modules/config/gtk-exe-env.nix b/nixos/modules/config/gtk-exe-env.nix deleted file mode 100644 index b565072e3a71..000000000000 --- a/nixos/modules/config/gtk-exe-env.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ - ]; - - options = { - gtkPlugins = lib.mkOption { - type = lib.types.listOf lib.types.path; - default = []; - description = '' - Plugin packages for GTK+ such as input methods. - ''; - }; - }; - - config = { - environment.variables = if builtins.length config.gtkPlugins > 0 - then - let - paths = [ pkgs.gtk2 pkgs.gtk3 ] ++ config.gtkPlugins; - env = pkgs.buildEnv { - name = "gtk-exe-env"; - - inherit paths; - - postBuild = lib.concatStringsSep "\n" - (map (d: d.gtkExeEnvPostBuild or "") paths); - - ignoreCollisions = true; - }; - in { - GTK_EXE_PREFIX = builtins.toString env; - GTK_PATH = [ - "${env}/lib/gtk-2.0" - "${env}/lib/gtk-3.0" - ]; - } - else {}; - }; -} diff --git a/nixos/modules/config/qt-plugin-env.nix b/nixos/modules/config/qt-plugin-env.nix deleted file mode 100644 index c59865604165..000000000000 --- a/nixos/modules/config/qt-plugin-env.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ - ]; - - options = { - qtPlugins = lib.mkOption { - type = lib.types.listOf lib.types.path; - default = []; - description = '' - Plugin packages for Qt such as input methods. - ''; - }; - }; - - config = { - environment.variables = if builtins.length config.qtPlugins > 0 - then - let - paths = [ pkgs.qt48 ] ++ config.qtPlugins; - env = pkgs.buildEnv { - name = "qt-plugin-env"; - - inherit paths; - - postBuild = lib.concatStringsSep "\n" - (map (d: d.qtPluginEnvPostBuild or "") paths); - - ignoreCollisions = true; - }; - in { - QT_PLUGIN_PATH = [ (builtins.toString env) ]; - } - else {}; - }; -} diff --git a/nixos/modules/i18n/inputMethod/fcitx.nix b/nixos/modules/i18n/inputMethod/fcitx.nix index f168f4451703..f73554b3edd2 100644 --- a/nixos/modules/i18n/inputMethod/fcitx.nix +++ b/nixos/modules/i18n/inputMethod/fcitx.nix @@ -29,8 +29,6 @@ in config = mkIf (config.i18n.inputMethod.enabled == "fcitx") { environment.systemPackages = [ fcitxPackage ]; - gtkPlugins = [ fcitxPackage ]; - qtPlugins = [ fcitxPackage ]; environment.variables = { GTK_IM_MODULE = "fcitx"; diff --git a/nixos/modules/i18n/inputMethod/nabi.nix b/nixos/modules/i18n/inputMethod/nabi.nix index 8c3965955130..c6708365effa 100644 --- a/nixos/modules/i18n/inputMethod/nabi.nix +++ b/nixos/modules/i18n/inputMethod/nabi.nix @@ -4,7 +4,6 @@ with lib; { config = mkIf (config.i18n.inputMethod.enabled == "nabi") { environment.systemPackages = [ pkgs.nabi ]; - qtPlugins = [ pkgs.nabi ]; environment.variables = { GTK_IM_MODULE = "nabi"; diff --git a/nixos/modules/i18n/inputMethod/uim.nix b/nixos/modules/i18n/inputMethod/uim.nix index 401e1932f70c..f8a3e560656d 100644 --- a/nixos/modules/i18n/inputMethod/uim.nix +++ b/nixos/modules/i18n/inputMethod/uim.nix @@ -23,8 +23,6 @@ in config = mkIf (config.i18n.inputMethod.enabled == "uim") { environment.systemPackages = [ pkgs.uim ]; - gtkPlugins = [ pkgs.uim ]; - qtPlugins = [ pkgs.uim ]; environment.variables = { GTK_IM_MODULE = "uim"; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index a50b17068f66..738b52854de3 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -7,7 +7,6 @@ ./config/fonts/fonts.nix ./config/fonts/ghostscript.nix ./config/gnu.nix - ./config/gtk-exe-env.nix ./config/i18n.nix ./config/krb5.nix ./config/ldap.nix @@ -16,7 +15,6 @@ ./config/nsswitch.nix ./config/power-management.nix ./config/pulseaudio.nix - ./config/qt-plugin-env.nix ./config/shells-environment.nix ./config/swap.nix ./config/sysctl.nix