Merge pull request #321659 from sodiboo/wootility-extras

wootility: implement `NIXOS_OZONE_WL` and add `.desktop` file
This commit is contained in:
Artturin
2024-06-28 16:23:22 +03:00
committed by GitHub
+17 -2
View File
@@ -4,6 +4,7 @@
, xorg
, udev
, wooting-udev-rules
, makeWrapper
}:
appimageTools.wrapType2 rec {
@@ -15,6 +16,20 @@ appimageTools.wrapType2 rec {
sha256 = "sha256-JodmF3TThPpXXx1eOnYmYAJ4x5Ylcf35bw3R++5/Buk=";
};
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/wootility \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -Dm444 ${contents}/wootility-lekker.desktop -t $out/share/applications
install -Dm444 ${contents}/wootility-lekker.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/wootility-lekker.desktop \
--replace-fail 'Exec=AppRun' 'Exec=wootility' \
--replace-warn 'Name=wootility-lekker' 'Name=Wootility'
'';
profile = ''
export LC_ALL=C.UTF-8
'';
@@ -31,8 +46,8 @@ appimageTools.wrapType2 rec {
homepage = "https://wooting.io/wootility";
description = "Customization and management software for Wooting keyboards";
platforms = [ "x86_64-linux" ];
license = "unknown";
maintainers = with maintainers; [ davidtwco ];
license = licenses.unfree;
maintainers = with maintainers; [ davidtwco sodiboo ];
mainProgram = "wootility";
};
}