Files
nur/pkgs/linux/musicpresence.nix

28 lines
877 B
Nix
Raw Normal View History

{ pkgs }:
let
pname = "musicpresence";
version = "2.3.5";
src = pkgs.fetchurl {
url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
hash = "sha256-M7oDxVevspA3SGuHktS8ChQAYopgIqypiVlzyE4uyqI=";
};
appimageContents = pkgs.appimageTools.extract {
inherit pname version src;
};
in
pkgs.appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = with pkgs; [ makeWrapper ];
extraInstallCommands = ''
wrapProgram $out/bin/${pname} \
--set QT_QPA_PLATFORM xcb \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -Dm444 ${appimageContents}/musicpresence.desktop -t $out/share/applications
'';
passthru.updateScript = pkgs.nix-update-script { };
}