From dd77fea3ec9044878794c4f3934c8f5757e7c591 Mon Sep 17 00:00:00 2001 From: wiyba Date: Thu, 9 Jul 2026 23:06:16 +0300 Subject: [PATCH] musicpresence: init at 2.3.6 --- pkgs/by-name/mu/musicpresence/package.nix | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 pkgs/by-name/mu/musicpresence/package.nix diff --git a/pkgs/by-name/mu/musicpresence/package.nix b/pkgs/by-name/mu/musicpresence/package.nix new file mode 100644 index 000000000000..d318a9e80955 --- /dev/null +++ b/pkgs/by-name/mu/musicpresence/package.nix @@ -0,0 +1,77 @@ +{ + lib, + stdenv, + fetchurl, + autoPatchelfHook, + makeWrapper, + libGL, + libxcb, + libx11, + wayland, + fontconfig, + freetype, + libgpg-error, + e2fsprogs, + xkeyboard_config, + qt6, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "musicpresence"; + version = "2.3.6"; + + src = fetchurl { + url = "https://github.com/ungive/discord-music-presence/releases/download/v${finalAttrs.version}/musicpresence-${finalAttrs.version}-linux-x86_64.tar.gz"; + hash = "sha256-w3y1I6nnztEMaihbXIfQqB0ng6s07iA8bqC8PDq+E+I="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + ]; + + buildInputs = [ + libGL + libxcb + libx11 + wayland + fontconfig + freetype + libgpg-error + e2fsprogs + stdenv.cc.cc.lib + ]; + + dontBuild = true; + dontConfigure = true; + + strictDeps = true; + __structuredAttrs = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp -r usr/share $out/ + + makeWrapper $out/share/musicpresence/bin/musicpresence $out/bin/musicpresence \ + --set XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb" \ + --prefix QT_PLUGIN_PATH : "${qt6.qtwayland}/${qt6.qtbase.qtPluginPrefix}" \ + --unset QT_STYLE_OVERRIDE + + runHook postInstall + ''; + + meta = { + description = "Discord music status that works with any media player"; + homepage = "https://github.com/ungive/discord-music-presence"; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + platforms = [ "x86_64-linux" ]; + mainProgram = "musicpresence"; + maintainers = with lib.maintainers; [ + wiyba + nonplay + ]; + }; +})