From a1a6d718c4347269d967739c8de9109fae64f31f Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 10 Jan 2024 22:25:07 +0800 Subject: [PATCH] niri: fix the installation files and its metadata --- pkgs/niri/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/niri/default.nix b/pkgs/niri/default.nix index f13a5c52..bff5017a 100644 --- a/pkgs/niri/default.nix +++ b/pkgs/niri/default.nix @@ -63,18 +63,25 @@ rustPlatform.buildRustPackage rec { postPatch = '' patchShebangs ./resources/niri-session + substituteInPlace ./resources/niri.service \ + --replace '/usr/bin' "$out/bin" ''; postInstall = '' - install -Dm0755 resources/niri-session -t $out/libexec - makeWrapper $out/libexec/niri-session \ + install -Dm0755 resources/niri-session -t $out/bin + + # This session script is used as a system component so we may as well fully + # wrap this with nixpkgs' dependencies. + wrapProgram $out/bin/niri-session \ --prefix PATH ':' '${lib.makeBinPath [ coreutils systemd dbus ]}' - install -Dm0644 resources/niri.desktop -t $out/share/applications + 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 + install -Dm0644 resources/niri{-shutdown.target,.service} -t $out/lib/systemd/user ''; + passthru.providedSessions = [ "niri" ]; + meta = with lib; { homepage = "https://github.com/YaLTeR/niri"; description = "Scrollable tiling window manager";