diff --git a/pkgs/applications/video/gpu-screen-recorder/0001-Don-t-install-systemd-unit-files-using-absolute-path.patch b/pkgs/applications/video/gpu-screen-recorder/0001-Don-t-install-systemd-unit-files-using-absolute-path.patch new file mode 100644 index 000000000000..1403d59b86ba --- /dev/null +++ b/pkgs/applications/video/gpu-screen-recorder/0001-Don-t-install-systemd-unit-files-using-absolute-path.patch @@ -0,0 +1,25 @@ +From cd8c6561079ee4c53b4bed390edd75a730ac685d Mon Sep 17 00:00:00 2001 +From: Tim Schumacher +Date: Thu, 4 Jul 2024 16:26:36 +0200 +Subject: [PATCH] Don't install systemd unit files using absolute paths + +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index a188f16..7807abe 100644 +--- a/meson.build ++++ b/meson.build +@@ -54,7 +54,7 @@ executable('gsr-kms-server', 'kms/server/kms_server.c', dependencies : dependenc + executable('gpu-screen-recorder', src, dependencies : dep, install : true) + + if get_option('systemd') == true +- install_data(files('extra/gpu-screen-recorder.service'), install_dir : '/usr/lib/systemd/user') ++ install_data(files('extra/gpu-screen-recorder.service'), install_dir : 'lib/systemd/user') + endif + + if get_option('capabilities') == true +-- +2.45.1 + diff --git a/pkgs/applications/video/gpu-screen-recorder/default.nix b/pkgs/applications/video/gpu-screen-recorder/default.nix index 63afa31a489a..1e97afa4a7d1 100644 --- a/pkgs/applications/video/gpu-screen-recorder/default.nix +++ b/pkgs/applications/video/gpu-screen-recorder/default.nix @@ -50,9 +50,12 @@ stdenv.mkDerivation { libXfixes ]; + patches = [ + ./0001-Don-t-install-systemd-unit-files-using-absolute-path.patch + ]; + mesonFlags = [ - # FIXME: systemd unit file gets installed to absolute path. - "-Dsystemd=false" + "-Dsystemd=true" # FIXME: Capabilities can not be set if not running the build with root permissions. "-Dcapabilities=false"