So I’m on a system that only has an old broken version of ncurses 5 available, and I’d like to use nix to build the kakoune editor with ncurses 6. I can do this fairly easily with just nix-shell -p ncurses or nix-shell '<nixpkgs>' -A kakoune since there is a kakoune package in nixpkgs. I’m not really sure how the nixpkgs version works because I have to modify the Makefile to have ncurses instead of ncursesw.
But when I do this, kakoune runs, but displays garbage, like ~U ~T~@ ~T~@ in the info box instead of the nice lines it normally does. The same thing happens when I run the version from nixpkgs nix-shell -p kakoune --run kak.
Any ideas? I’ve been trying to figure this out for a while with absolutely no success.
I can reproduce this on my 18.03 using nix-shell -I nixpkgs=channel:nixos-unstable -p kakoune --run kak. However, the issue seems to be specific to kakoune — nix-shell -I nixpkgs=channel:nixos-unstable -p ncdu --run ncdu works fine.
I installed it as well withnix from the latest nixpkgs-unstable on ubuntu 16.04 and I see the same issue. Does it work if you try it on your system? If you run it with kak you should see a pop-up with a changelog and you can see the broken output there already (it is a sort of vim clone, so you then exit with “:q” :))
I get the same problem with nix-shell -I nixpkgs=channel:nixos-16.09, (though you have to go find the info box, it doesn’t show at startup that far back) and that’s as far back as the kakoune package goes. I haven’t yet found any version or way to build kakoune with nix that works properly.
So, I mentioned having to replace ncursesw with ncurses in the Makefile to get it to build. One interesting tidbit is that if I do that, and then build kakoune without nix I end up with a similar problem, though the corruption is a bit different: M-b~UM--M-b etc.
ncdu works fine for me, but doesn’t seem to use the fancy unicode characters that Kakoune is using, so I’m not sure that’s true. Kakoune works and displays fine other than the unicode characters in the info box.
I have also encountered the same problem, although only with the latest version on the unstable channel. The one on the stable branch seems fine wrt display characters, although it (besides being older) has a very annoying bug that causes it to crash if you enter a % at the command prompt.
I am not sure what it is. Talking to people on the #kakoune and #nixos IRC channels, I though that somehow ncurses that kakoune was did not have wide character support, but I do not think that is the case.