0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

goxlr-utility: 1.1.1 -> 1.1.1-unstable-2024-08-06

fixes #331319 where user expects xdg desktop entry to continue work as a launcher
hopefully also helps with #332957
This commit is contained in:
Erno Hopearuoho 2024-08-06 19:17:56 +03:00
parent 31a02bb482
commit eb8268e6cb
3 changed files with 1944 additions and 1116 deletions

View file

@ -28,19 +28,30 @@ with lib;
};
};
config = mkIf config.services.goxlr-utility.enable
{
config =
let
goxlr-autostart = pkgs.stdenv.mkDerivation {
name = "autostart-goxlr-daemon";
priority = 5;
buildCommand = ''
mkdir -p $out/etc/xdg/autostart
cp ${cfg.package}/share/applications/goxlr-utility.desktop $out/etc/xdg/autostart/goxlr-daemon.desktop
chmod +w $out/etc/xdg/autostart/goxlr-daemon.desktop
echo "X-KDE-autostart-phase=2" >> $out/etc/xdg/autostart/goxlr-daemon.desktop
substituteInPlace $out/etc/xdg/autostart/goxlr-daemon.desktop \
--replace-fail goxlr-launcher goxlr-daemon
'';
};
in
mkIf config.services.goxlr-utility.enable {
services.udev.packages = [ cfg.package ];
xdg.autostart.enable = mkIf cfg.autoStart.xdg true;
environment.systemPackages = mkIf cfg.autoStart.xdg
[
cfg.package
(pkgs.makeAutostartItem
{
name = "goxlr-utility";
package = cfg.package;
})
goxlr-autostart
];
};