2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, libxkbcommon
|
|
|
|
, pango
|
|
|
|
, pipewire
|
|
|
|
, seatd
|
|
|
|
, stdenv
|
|
|
|
, wayland
|
|
|
|
, systemd
|
|
|
|
, libinput
|
|
|
|
, mesa
|
|
|
|
, fontconfig
|
|
|
|
, libglvnd
|
|
|
|
, libclang
|
|
|
|
, autoPatchelfHook
|
|
|
|
, clang
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "niri";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.1.5";
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "YaLTeR";
|
|
|
|
repo = "niri";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-YuYowUw5ecPa78bhT72zY2b99wn68mO3vVkop8hnb8M=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-04-21 15:54:59 +00:00
|
|
|
"smithay-0.3.0" = "sha256-1ANERwRG7Uwe1gSm6zQnEMQlpRrGSFP8mp6JItzjz0k=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.bindgenHook
|
|
|
|
autoPatchelfHook
|
|
|
|
clang
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
wayland
|
|
|
|
systemd # For libudev
|
|
|
|
seatd # For libseat
|
|
|
|
libxkbcommon
|
|
|
|
libinput
|
|
|
|
mesa # For libgbm
|
|
|
|
fontconfig
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
pipewire
|
|
|
|
pango
|
|
|
|
];
|
|
|
|
|
|
|
|
runtimeDependencies = [
|
|
|
|
wayland
|
|
|
|
mesa
|
|
|
|
libglvnd # For libEGL
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.providedSessions = ["niri"];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./resources/niri-session
|
|
|
|
substituteInPlace ./resources/niri.service \
|
|
|
|
--replace-fail '/usr/bin' "$out/bin"
|
2024-02-29 20:09:43 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm0755 ./resources/niri-session -t $out/bin
|
|
|
|
install -Dm0644 resources/niri.desktop -t $out/share/wayland-sessions
|
|
|
|
install -Dm0644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal
|
|
|
|
install -Dm0644 resources/niri{-shutdown.target,.service} -t $out/share/systemd/user
|
2024-02-29 20:09:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A scrollable-tiling Wayland compositor";
|
|
|
|
homepage = "https://github.com/YaLTeR/niri";
|
|
|
|
license = licenses.gpl3Only;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ iogamaster foo-dogsquared sodiboo ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "niri";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|