From 85cedbb7e990df46e79882764e9250fe17da3ee7 Mon Sep 17 00:00:00 2001 From: itsyunaya <40719746+itsyunaya@users.noreply.github.com> Date: Sat, 12 Sep 2026 13:40:17 +0200 Subject: [PATCH 1/2] maintainers: add itsyunaya --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 6c00b8b06f14..76d1361804ed 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -12449,6 +12449,11 @@ githubId = 17727163; keys = [ { fingerprint = "FBAA B86A 101B 4C5F D4F1 25D2 E93D DAC1 7E5D 6CA1"; } ]; }; + itsyunaya = { + name = "Ashley Marino"; + github = "itsyunaya"; + githubId = 40719746; + }; ius = { email = "j.de.gram@gmail.com"; name = "Joerie de Gram"; From 964039ea394651d49108894e565c9ce3f0b908b2 Mon Sep 17 00:00:00 2001 From: itsyunaya <40719746+itsyunaya@users.noreply.github.com> Date: Sat, 12 Sep 2026 13:41:41 +0200 Subject: [PATCH 2/2] musicpresence: add darwin support --- pkgs/by-name/mu/musicpresence/package.nix | 130 ++++++++++++++-------- 1 file changed, 86 insertions(+), 44 deletions(-) diff --git a/pkgs/by-name/mu/musicpresence/package.nix b/pkgs/by-name/mu/musicpresence/package.nix index d318a9e80955..8e96e777c63d 100644 --- a/pkgs/by-name/mu/musicpresence/package.nix +++ b/pkgs/by-name/mu/musicpresence/package.nix @@ -1,6 +1,7 @@ { lib, stdenv, + stdenvNoCC, fetchurl, autoPatchelfHook, makeWrapper, @@ -14,64 +15,105 @@ e2fsprogs, xkeyboard_config, qt6, + undmg, }: - -stdenv.mkDerivation (finalAttrs: { +let 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="; + sources = { + "x86_64-linux" = fetchurl { + url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/musicpresence-${version}-linux-x86_64.tar.gz"; + hash = "sha256-w3y1I6nnztEMaihbXIfQqB0ng6s07iA8bqC8PDq+E+I="; + }; + "aarch64-darwin" = fetchurl { + url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/musicpresence-${version}-mac-arm64.dmg"; + hash = "sha256-IvUyzR9amMhyWHRuhTuqUFALCE3QTRjHmsASKydnj8Q="; + }; }; - 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" ]; + platforms = [ + "x86_64-linux" + "aarch64-darwin" + ]; mainProgram = "musicpresence"; maintainers = with lib.maintainers; [ wiyba nonplay + itsyunaya ]; }; -}) + + linuxDrv = stdenv.mkDerivation { + inherit pname version meta; + + src = sources.x86_64-linux; + + 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 + ''; + }; +in +if stdenv.hostPlatform.isLinux then + linuxDrv +else + stdenvNoCC.mkDerivation { + inherit pname version meta; + + src = sources.aarch64-darwin; + sourceRoot = "."; + + nativeBuildInputs = [ + makeWrapper + undmg + ]; + + dontBuild = true; + dontConfigure = true; + + installPhase = '' + runHook preInstall + mkdir -p "$out/Applications" + cp -a Music\ Presence.app "$out/Applications" + makeWrapper "$out/Applications/Music Presence.app/Contents/MacOS/Music Presence" "$out/bin/musicpresence" + runHook postInstall + ''; + }