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

alacritty: use hiPrio (fix #71300) #74358

Closed

Conversation

Br1ght0ne
Copy link
Member

@Br1ght0ne Br1ght0ne commented Nov 27, 2019

This should allow alacritty to override any terminfo/a/alacritty* files
provided by ncurses with the ones freshly compiled with tic.

Motivation for this change

Fix #71300

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nix-review --run "nix-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @Mic92 @worldofpeace @NilsIrl


This change is Reviewable

@NilsIrl
Copy link
Member

NilsIrl commented Nov 27, 2019

I tested it and it doesn't fix anything for me.

Here is what I did:

$ git remote add filalex77 git@github.com:filalex77/nixpkgs.git
$ git fetch filalex77
$ git checkout --track filalex77/71300-alacritty-terminfo-override
$ sudo nixos-rebuild switch -I nixpkgs=.

@teto
Copy link
Member

teto commented Dec 1, 2019

Rather than hardcoding the number, I recommend to use the helpers in lib/meta.nix like hiPrio that could be used from all-packages.nix: alacritty = hiPrio (callPackage ...);

@Br1ght0ne Br1ght0ne force-pushed the 71300-alacritty-terminfo-override branch 2 times, most recently from 55734d5 to 40ed7de Compare December 2, 2019 09:25
This should allow `alacritty` to override any `terminfo/a/alacritty*` files
provided by `ncurses` with the ones freshly compiled with `tic`.
@Br1ght0ne
Copy link
Member Author

@GrahamcOfBorg build alacritty

@teto
Copy link
Member

teto commented Dec 2, 2019

@NilsIrl could you retest before I merge please ?

@Br1ght0ne Br1ght0ne changed the title alacritty: set priority to -1 (fix #71300) alacritty: use hiPrio (fix #71300) Dec 2, 2019
@NilsIrl
Copy link
Member

NilsIrl commented Dec 2, 2019

@NilsIrl could you retest before I merge please ?

Doesn't fix the problem for me

$ ls -Al /run/current-system/sw/share/terminfo/a/alacritty
lrwxrwxrwx 1 root root 91 Jan  1  1970 /run/current-system/sw/share/terminfo/a/alacritty -> /nix/store/yfpiz0n3dykir9r2skbxlvcard9xp275-ncurses-6.1-20190112/share/terminfo/a/alacritty

@Mic92
Copy link
Member

Mic92 commented Dec 6, 2019

Confirmed, it only merges in the terminfo variants that are not in ncurses.

$ ls -la /run/current-system/sw/share/terminfo/a/alacritty*
lrwxrwxrwx 91 root  1 Jan  1970  /run/current-system/sw/share/terminfo/a/alacritty -> /nix/store/yfpiz0n3dykir9r2skbxlvcard9xp275-ncurses-6.1-20190112/share/terminfo/a/alacritty
lrwxrwxrwx 98 root  1 Jan  1970  /run/current-system/sw/share/terminfo/a/alacritty+common -> /nix/store/yfpiz0n3dykir9r2skbxlvcard9xp275-ncurses-6.1-20190112/share/terminfo/a/alacritty+common
lrwxrwxrwx 98 root  1 Jan  1970  /run/current-system/sw/share/terminfo/a/alacritty-direct -> /nix/store/yfpiz0n3dykir9r2skbxlvcard9xp275-ncurses-6.1-20190112/share/terminfo/a/alacritty-direct

Right now I switched to TERM=alacritty-direct in ~/.config/alacritty/alacritty.yml:

env:
#  # TERM variable
#  #
#  # This value is used to set the `$TERM` environment variable for
#  # each instance of Alacritty. If it is not present, alacritty will
#  # check the local terminfo database and use 'alacritty' if it is
#  # available, otherwise 'xterm-256color' is used.
#  TERM: xterm-256color
   TERM: alacritty-direct

Update mhm both alacritty-direct and alacritty no longer seem to work with OSC52 and tmux, what a shame. Could be unrelated so. They changed something there Escape for reading clipboard (OSC 52 ; <s / p / c> ; ? BEL) in alacritty 0.4.

UPDATE2 This bug seems to be fixed in alacritty/alacritty#2966

UPDATE 3 This alacritty version no longer has the bug: Mic92@2dcc884

@Br1ght0ne
Copy link
Member Author

@NilsIrl @Mic92 Thanks a lot for your help.
If that's the case, I'll close the PR for now and update the derivation as soon as the release is out.

@Br1ght0ne Br1ght0ne closed this Dec 7, 2019
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.

No colour in alacritty when installed via configuration.nix
5 participants