jay: add wayland session, shell completions, update script (#496158)

This commit is contained in:
Sandro
2026-03-15 20:35:26 +00:00
committed by GitHub
+16
View File
@@ -1,5 +1,6 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
libGL,
@@ -13,6 +14,8 @@
libglvnd,
vulkan-loader,
autoPatchelfHook,
installShellFiles,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@@ -32,6 +35,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
nativeBuildInputs = [
autoPatchelfHook
installShellFiles
pkgconf
];
@@ -53,8 +57,20 @@ rustPlatform.buildRustPackage (finalAttrs: {
postInstall = ''
install -D etc/jay.portal $out/share/xdg-desktop-portal/portals/jay.portal
install -D etc/jay-portals.conf $out/share/xdg-desktop-portal/jay-portals.conf
install -D etc/jay.desktop $out/share/wayland-sessions/jay.desktop
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd jay \
--bash <("$out/bin/jay" generate-completion bash) \
--zsh <("$out/bin/jay" generate-completion zsh) \
--fish <("$out/bin/jay" generate-completion fish)
'';
passthru = {
updateScript = nix-update-script { };
providedSessions = [ "jay" ];
};
meta = {
description = "Wayland compositor written in Rust";
homepage = "https://github.com/mahkoh/jay";