Merge pull request #192968 from SuperSandro2000/wezterm

This commit is contained in:
Sandro 2022-09-29 11:38:47 +02:00 committed by GitHub
commit 72f137171e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@
, pkg-config
, python3
, fontconfig
, installShellFiles
, openssl
, libGL
, libX11
@ -49,9 +50,10 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-XJAeMDwtLtBzHMU/cb3lZgmcw5F3ifjKzKVmuP85/RY=";
nativeBuildInputs = [
installShellFiles
ncurses # tic for terminfo
pkg-config
python3
ncurses # tic for terminfo
] ++ lib.optional stdenv.isDarwin perl;
buildInputs = [
@ -75,17 +77,23 @@ rustPlatform.buildRustPackage rec {
UserNotifications
];
buildFeatures = [ "distro-defaults" ];
postInstall = ''
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
install -Dm644 assets/wezterm.desktop $out/share/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml $out/share/metainfo/org.wezfurlong.wezterm.appdata.xml
# helper scripts
install -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.d
installShellCompletion --cmd wezterm \
--bash assets/shell-completion/bash \
--fish assets/shell-completion/fish \
--zsh assets/shell-completion/zsh
install -Dm644 assets/wezterm-nautilus.py -t $out/share/nautilus-python/extensions
'';
preFixup = lib.optionalString stdenv.isLinux ''