mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
uim, gtk-exe-env, qt-plugin-env: Add input method modules for GTK+ and Qt
This commit is contained in:
parent
d2e731e111
commit
a0c91d66f1
10 changed files with 404 additions and 1 deletions
37
nixos/modules/config/qt-plugin-env.nix
Normal file
37
nixos/modules/config/qt-plugin-env.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ 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 {};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue