Merge pull request #179723 from AndrewKvalheim/signal-desktop/electron-spellchecker

signal-desktop: revert “Allow overriding the spell checker language”
This commit is contained in:
Sandro 2022-07-03 14:13:12 +02:00 committed by GitHub
commit cb6124d0aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,24 +5,9 @@
, cups, expat, libuuid, at-spi2-core, libappindicator-gtk3, mesa
# Runtime dependencies:
, systemd, libnotify, libdbusmenu, libpulseaudio, xdg-utils
# Unfortunately this also overwrites the UI language (not just the spell
# checking language!):
, hunspellDicts, spellcheckerLanguage ? null # E.g. "de_DE"
# For a full list of available languages:
# $ cat pkgs/development/libraries/hunspell/dictionaries.nix | grep "dictFileName =" | awk '{ print $3 }'
}:
let
customLanguageWrapperArgs = (with lib;
let
# E.g. "de_DE" -> "de-de" (spellcheckerLanguage -> hunspellDict)
spellLangComponents = splitString "_" spellcheckerLanguage;
hunspellDict = elemAt spellLangComponents 0 + "-" + toLower (elemAt spellLangComponents 1);
in lib.optionalString (spellcheckerLanguage != null) ''
--set HUNSPELL_DICTIONARIES "${hunspellDicts.${hunspellDict}}/share/hunspell" \
--set LC_MESSAGES "${spellcheckerLanguage}"'');
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "signal-desktop";
version = "5.47.0"; # Please backport all updates to the stable channel.
# All releases have a limited lifetime and "expire" 90 days after the release.
@ -123,7 +108,6 @@ in stdenv.mkDerivation rec {
preFixup = ''
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ] }"
${customLanguageWrapperArgs}
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
)