wezterm: build terminfo file without compiling wezterm
This commit is contained in:
parent
9b310a73db
commit
5a5699b71e
@ -23,14 +23,13 @@
|
||||
, Foundation
|
||||
, libiconv
|
||||
, nixosTests
|
||||
, runCommand
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "wezterm";
|
||||
version = "20220408-101518-b908e2dd";
|
||||
|
||||
outputs = [ "out" "terminfo" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wez";
|
||||
repo = pname;
|
||||
@ -75,10 +74,8 @@ rustPlatform.buildRustPackage rec {
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# terminfo
|
||||
mkdir -p $terminfo/share/terminfo/w $out/nix-support
|
||||
tic -x -o $terminfo/share/terminfo termwiz/data/wezterm.terminfo
|
||||
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
|
||||
mkdir -p $out/nix-support
|
||||
echo "${passthru.terminfo}" >> $out/nix-support/propagated-user-env-packages
|
||||
|
||||
# desktop icon
|
||||
install -Dm644 assets/icon/terminal.png $out/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
|
||||
@ -100,9 +97,20 @@ rustPlatform.buildRustPackage rec {
|
||||
ln -s $out/bin/{wezterm,wezterm-mux-server,wezterm-gui,strip-ansi-escapes} "$OUT_APP"
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
all-terminfo = nixosTests.allTerminfo;
|
||||
test = nixosTests.terminal-emulators.wezterm;
|
||||
passthru = {
|
||||
tests = {
|
||||
all-terminfo = nixosTests.allTerminfo;
|
||||
terminal-emulators = nixosTests.terminal-emulators.wezterm;
|
||||
};
|
||||
terminfo = runCommand "wezterm-terminfo"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
ncurses
|
||||
];
|
||||
} ''
|
||||
mkdir -p $out/share/terminfo $out/nix-support
|
||||
tic -x -o $out/share/terminfo ${src}/termwiz/data/wezterm.terminfo
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user