{ lib, rustPlatform, fetchFromGitHub, pkg-config, wayland, libxkbcommon, libinput, seatd, libGL, libgbm, libdisplay-info, libdrm, systemd, vulkan-loader, pipewire, }: rustPlatform.buildRustPackage { pname = "halley"; version = "0.5.0"; src = fetchFromGitHub { owner = "saltnpepper97"; repo = "halley"; rev = "dc3b901425e9aafe994b01566c20acc30484baed"; hash = "sha256-vx4zEJzVWZeUY3KF8fSWbdY1aCQjTLIE3XnPAq/j7Ho="; }; cargoHash = "sha256-ZAeOsmVwWg4FSKKSg7IUYJT/SGyd/y52CeukOznN8hQ="; nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ]; buildInputs = [ wayland libxkbcommon libinput seatd libGL libgbm libdisplay-info libdrm systemd vulkan-loader pipewire ]; doCheck = false; env = { RUSTFLAGS = toString ( map (arg: "-C link-arg=" + arg) [ "-Wl,--push-state,--no-as-needed" "-lEGL" "-lwayland-client" "-Wl,--pop-state" ] ); }; postInstall = '' install -Dm644 packaging/xdg-desktop-portal/halley-portals.conf $out/share/xdg-desktop-portal/halley-portals.conf cat > $out/bin/halley-session <<'EOF' #!/bin/sh systemctl --user import-environment if hash dbus-update-activation-environment 2>/dev/null; then dbus-update-activation-environment --all fi systemctl --user start graphical-session-pre.target systemctl --user start graphical-session.target halley systemctl --user stop graphical-session.target systemctl --user stop graphical-session-pre.target systemctl --user unset-environment WAYLAND_DISPLAY DISPLAY EOF chmod +x $out/bin/halley-session mkdir -p $out/share/wayland-sessions cat > $out/share/wayland-sessions/halley.desktop <