-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
steam: Add support for Steam IM input methods
* Add support for Chinese Pinyin, Japanese, Korean input methods Signed-off-by: bigsaltyfishes <[email protected]>
- Loading branch information
1 parent
c11bab1
commit 00442c1
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ in | |
./steam.nix | ||
./autostart.nix | ||
./environment.nix | ||
./inputmethod.nix | ||
]; | ||
options = { | ||
jovian = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
let | ||
inherit (lib) | ||
mkOption | ||
types | ||
elem | ||
mkIf | ||
optionals | ||
; | ||
|
||
cfg = config.jovian.steam.inputMethod; | ||
in | ||
{ | ||
options = { | ||
jovian = { | ||
steam = { | ||
inputMethod = { | ||
enable = mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
Whether to enable the Steam IM support. | ||
Enable this if you want to enable Steam IM support. | ||
This will also set system wide input method to `ibus`. | ||
''; | ||
}; | ||
methods = mkOption { | ||
type = types.listOf types.str; | ||
default = [ ]; | ||
example = [ "pinyin" "japanese" "korean" ]; | ||
description = '' | ||
List of input methods to enable. | ||
This option is only used when `enable` is set to `true`. | ||
''; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
environment.systemPackages = with pkgs; [ | ||
steam-im-modules | ||
]; | ||
|
||
i18n.inputMethod = { | ||
enable = true; | ||
type = "ibus"; | ||
ibus = { | ||
engines = with pkgs.ibus-engines; | ||
optionals (elem "pinyin" cfg.methods) [ pinyin ] | ||
++ optionals (elem "japanese" cfg.methods) [ anthy ] | ||
++ optionals (elem "korean" cfg.methods) [ hangul ]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
, extra-cmake-modules | ||
, wrapGAppsHook3 | ||
, wrapGAppsHook4 | ||
, libsForQt5 | ||
, gtk3 | ||
, gtk4 | ||
, lib | ||
}: | ||
stdenv.mkDerivation { | ||
pname = "steam-im-modules"; | ||
version = "jupiter-20240131"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "valve-project"; | ||
repo = "steam-qt-keyboard-plugin"; | ||
rev = "eab7d4c13bbe1372b7b28731b8209c12037e91af"; | ||
sha256 = "L9rKEUxDT0fYrvnPIMJS5/wSq1W2KowreaxeXmcCq60="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
extra-cmake-modules | ||
wrapGAppsHook3 | ||
wrapGAppsHook4 | ||
libsForQt5.wrapQtAppsHook | ||
]; | ||
|
||
buildInputs = [ | ||
libsForQt5.qtbase | ||
gtk3 | ||
gtk4 | ||
]; | ||
|
||
cmakeBuildType = "RelWithDebInfo"; | ||
|
||
meta = with lib; { | ||
description = "Steam Qt Keyboard Plug-in"; | ||
homepage = "https://github.com/valve-project/steam-qt-keyboard-plugin"; | ||
license = licenses.gpl3; | ||
platforms = platforms.linux; | ||
}; | ||
} |