From d3f5f5f5de77d152b0e34bd3e6d1c8a33aca7231 Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 7 Jan 2025 08:59:37 +0300 Subject: Add supplementary files to the package --- default.nix | 9 +++++++++ xdg-desktop-portal-systemd.desktop | 6 ++++++ xdg-desktop-portal-systemd.service | 7 +++++++ xyz.vikanezrimaya.fdo.portal.Systemd.service | 4 ++++ 4 files changed, 26 insertions(+) create mode 100644 xdg-desktop-portal-systemd.desktop create mode 100644 xdg-desktop-portal-systemd.service create mode 100644 xyz.vikanezrimaya.fdo.portal.Systemd.service diff --git a/default.nix b/default.nix index a5650c9..81d4916 100644 --- a/default.nix +++ b/default.nix @@ -19,6 +19,15 @@ let in crane.buildPackage (args' // { postInstall = '' install -Dm755 ${./xdg-desktop-portal-systemd.portal} $out/share/xdg-desktop-portal/portals/xdg-desktop-portal-systemd.portal + + mkdir -p $out/share/systemd/user/ + substituteAll ${./xdg-desktop-portal-systemd.service} $out/share/systemd/user/xdg-desktop-portal-systemd.service + + mkdir -p $out/share/dbus-1/services/ + substituteAll ${./xyz.vikanezrimaya.fdo.portal.Systemd.service} $out/share/dbus-1/services/xyz.vikanezrimaya.fdo.portal.Systemd.service + + mkdir -p $out/share/applications + substituteAll ${./xdg-desktop-portal-systemd.desktop} $out/share/applications/xdg-desktop-portal-systemd.desktop ''; passthru = { clippy = crane.cargoClippy (args' // { diff --git a/xdg-desktop-portal-systemd.desktop b/xdg-desktop-portal-systemd.desktop new file mode 100644 index 0000000..0cc4925 --- /dev/null +++ b/xdg-desktop-portal-systemd.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=Portal +Icon=applications-system-symbolic +Exec=@out@/bin/xdg-desktop-portal-systemd +NoDisplay=true \ No newline at end of file diff --git a/xdg-desktop-portal-systemd.service b/xdg-desktop-portal-systemd.service new file mode 100644 index 0000000..79852d8 --- /dev/null +++ b/xdg-desktop-portal-systemd.service @@ -0,0 +1,7 @@ +[Unit] +Description=Portal service (idle inhibit via systemd-logind) + +[Service] +Type=dbus +BusName=xyz.vikanezrimaya.fdo.portal.Systemd +ExecStart=@out@/bin/xdg-desktop-portal-systemd \ No newline at end of file diff --git a/xyz.vikanezrimaya.fdo.portal.Systemd.service b/xyz.vikanezrimaya.fdo.portal.Systemd.service new file mode 100644 index 0000000..56cb6b3 --- /dev/null +++ b/xyz.vikanezrimaya.fdo.portal.Systemd.service @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=xyz.vikanezrimaya.fdo.portal.Systemd +Exec=@out@/bin/xdg-desktop-portal-systemd +SystemdService=xdg-desktop-portal-systemd.service \ No newline at end of file -- cgit 1.4.1