2023-12-27 11:15:25 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, pipewire
|
|
|
|
, udev
|
|
|
|
, libxkbcommon
|
|
|
|
, libinput
|
|
|
|
, systemd
|
|
|
|
, wayland
|
|
|
|
, mesa
|
|
|
|
, seatd
|
2024-01-01 05:52:50 +00:00
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
# Session script dependencies.
|
2024-01-01 05:52:50 +00:00
|
|
|
, makeBinaryWrapper
|
|
|
|
, coreutils
|
|
|
|
, dbus
|
2023-12-27 11:15:25 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "niri";
|
2024-01-09 02:52:10 +00:00
|
|
|
version = "0.1.0-alpha.3";
|
2023-12-27 11:15:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "YaLTeR";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-09 02:52:10 +00:00
|
|
|
hash = "sha256-X3n8Mt3M5+Z8YDvYZOVCgKSHLTQJtBdbMBl0c5O/tt0=";
|
2023-12-27 11:15:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-01-01 05:52:50 +00:00
|
|
|
makeBinaryWrapper
|
2023-12-27 11:15:25 +00:00
|
|
|
pkg-config
|
2024-01-01 05:52:50 +00:00
|
|
|
rustPlatform.bindgenHook
|
2023-12-27 11:15:25 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libinput
|
|
|
|
libxkbcommon
|
|
|
|
mesa
|
|
|
|
pipewire
|
|
|
|
seatd
|
|
|
|
systemd
|
|
|
|
udev
|
|
|
|
wayland
|
|
|
|
];
|
|
|
|
|
|
|
|
cargoLock = {
|
2024-01-01 05:52:50 +00:00
|
|
|
lockFile = "${src}/Cargo.lock";
|
2023-12-27 11:15:25 +00:00
|
|
|
outputHashes = {
|
2024-01-09 02:52:10 +00:00
|
|
|
"smithay-0.3.0" = "sha256-+VIKgdonZScAb38QcSatyoYGPSV3Q7lscd3U5jajdbM=";
|
2023-12-27 11:15:25 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-01-01 05:52:50 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./resources/niri-session
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm0755 resources/niri-session -t $out/libexec
|
|
|
|
makeWrapper $out/libexec/niri-session \
|
|
|
|
--prefix PATH ':' '${lib.makeBinPath [ coreutils systemd dbus ]}'
|
|
|
|
|
|
|
|
install -Dm0644 resources/niri.desktop -t $out/share/applications
|
|
|
|
install -Dm0644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal
|
|
|
|
install -Dm0644 resources/niri{-shutdown.target,.service} -t $out/share/systemd
|
|
|
|
'';
|
|
|
|
|
2023-12-27 11:15:25 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/YaLTeR/niri";
|
|
|
|
description = "Scrollable tiling window manager";
|
|
|
|
license = licenses.gpl3Plus;
|
2024-01-01 05:52:50 +00:00
|
|
|
mainProgram = "niri";
|
2023-12-27 11:15:25 +00:00
|
|
|
maintainers = with maintainers; [ foo-dogsquared ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|