Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signal-desktop: Allow overriding the spell checker language #44456

Merged
merged 1 commit into from Aug 4, 2018

Conversation

primeos
Copy link
Member

@primeos primeos commented Aug 4, 2018

Thought this could be useful for others as well. Unfortunately it will
also override the UI language.

Example usage:

  environment.systemPackages = with pkgs; [
    (signal-desktop.override {
      spellcheckerLanguage = "de_DE";
    })
  ];
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Known problems: Apparently umlauts don't work correctly...

Thought this could be useful for others as well. Unfortunately it will
also override the UI language.

Example usage:

  environment.systemPackages = with pkgs; [
    (signal-desktop.override {
      spellcheckerLanguage = "de_DE";
    })
  ];
@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: signal-desktop

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: signal-desktop

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: signal-desktop

Partial log (click to expand)

trying https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_1.15.0_amd64.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 66.7M  100 66.7M    0     0  83.3M      0 --:--:-- --:--:-- --:--:-- 83.2M
copying path '/nix/store/ywh4f81nz6jy80fsml2v7f3ph2ja8hpr-gtk+3-3.22.30' from 'https://cache.nixos.org'...
copying path '/nix/store/yfjg5hhynjx0ikgka8r884da2x6q2ai0-hook' from 'https://cache.nixos.org'...
building '/nix/store/a5f2y70w6qgqpx4ay61xshdxsvcpg4h8-signal-desktop-1.15.0.drv'...
unpacking sources
installing
/nix/store/ymh361wigrsdrfkmwp34scnn7mxlx8l2-signal-desktop-1.15.0

@primeos primeos merged commit 9ef1406 into NixOS:master Aug 4, 2018
@primeos primeos deleted the signal-desktop-spellchecker-language branch August 4, 2018 14:02
then ''
--set HUNSPELL_DICTIONARIES "${hunspellDicts.${hunspellDict}}/share/hunspell" \
--set LC_MESSAGES "${spellcheckerLanguage}"''
else "");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You already merged it, but these parens are unnecessary

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@infinisil Are you sure? You mean something like --set LC_MESSAGES "$spellcheckerLanguage"'', right? Normally that would work because Nix would create a corresponding shell variable for the attribute (IIRC this is done for all attributes passed to mkDerivation, if they're "representable in Bash"). But since the scope of e.g. spellcheckerLanguage is limited (by let ... in ...) the variable is never passed to mkDerivation and I therefore have to use the (Nix expression language) variable instead of the Bash variable. Or am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nvm, you've probably meant the parentheses around the if, yeah, I've missed that...

primeos added a commit to primeos/nixpkgs that referenced this pull request Oct 15, 2018
)

Thought this could be useful for others as well. Unfortunately it will
also override the UI language.

Example usage:

  environment.systemPackages = with pkgs; [
    (signal-desktop.override {
      spellcheckerLanguage = "de_DE";
    })
  ];

(cherry picked from commit 9ef1406)
SuperSandro2000 pushed a commit that referenced this pull request Jul 3, 2022
…44456)"

This reverts commit 9ef1406.

Signal Desktop removed this functionality when changing spell checkers:

  - signalapp/Signal-Desktop@6a517e4
  - signalapp/Signal-Desktop@4a8f5db
github-actions bot pushed a commit that referenced this pull request Jul 3, 2022
…44456)"

This reverts commit 9ef1406.

Signal Desktop removed this functionality when changing spell checkers:

  - signalapp/Signal-Desktop@6a517e4
  - signalapp/Signal-Desktop@4a8f5db

(cherry picked from commit cb7ddc7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants