NixOS: Use runCommand instead of mkDerivation in a few places
This commit is contained in:
@@ -3,26 +3,27 @@
|
||||
with lib;
|
||||
let
|
||||
cfg = config.i18n.inputMethod;
|
||||
gtk2_cache = pkgs.stdenv.mkDerivation {
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
name = "gtk2-immodule.cache";
|
||||
buildInputs = [ pkgs.gtk2 cfg.package ];
|
||||
buildCommand = ''
|
||||
|
||||
gtk2_cache = pkgs.runCommand "gtk2-immodule.cache"
|
||||
{ preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
buildInputs = [ pkgs.gtk2 cfg.package ];
|
||||
}
|
||||
''
|
||||
mkdir -p $out/etc/gtk-2.0/
|
||||
GTK_PATH=${cfg.package}/lib/gtk-2.0/ gtk-query-immodules-2.0 > $out/etc/gtk-2.0/immodules.cache
|
||||
'';
|
||||
};
|
||||
gtk3_cache = pkgs.stdenv.mkDerivation {
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
name = "gtk3-immodule.cache";
|
||||
buildInputs = [ pkgs.gtk3 cfg.package ];
|
||||
buildCommand = ''
|
||||
|
||||
gtk3_cache = pkgs.runCommand "gtk3-immodule.cache"
|
||||
{ preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
buildInputs = [ pkgs.gtk3 cfg.package ];
|
||||
}
|
||||
''
|
||||
mkdir -p $out/etc/gtk-3.0/
|
||||
GTK_PATH=${cfg.package}/lib/gtk-3.0/ gtk-query-immodules-3.0 > $out/etc/gtk-3.0/immodules.cache
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options.i18n = {
|
||||
|
||||
Reference in New Issue
Block a user