diff options
author | Zhong Jianxin <azuwis@users.noreply.github.com> | 2023-06-30 07:29:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 19:29:24 -0400 |
commit | 1cdf0bddc87728e9f7e54eff693f0d62e0377096 (patch) | |
tree | 8d455206693099ee3332fe809548c97bfee8884a /pkgs/applications/misc/moonlight-qt/default.nix | |
parent | b1434f14da608b9e19f56fe9cad6ee0b0d81c1cf (diff) |
moonlight-qt: Support darwin (#239600)
Diffstat (limited to 'pkgs/applications/misc/moonlight-qt/default.nix')
-rw-r--r-- | pkgs/applications/misc/moonlight-qt/default.nix | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/pkgs/applications/misc/moonlight-qt/default.nix b/pkgs/applications/misc/moonlight-qt/default.nix index 3108d78e8ff8b..cbbbdc4d75986 100644 --- a/pkgs/applications/misc/moonlight-qt/default.nix +++ b/pkgs/applications/misc/moonlight-qt/default.nix @@ -16,8 +16,13 @@ , libopus , ffmpeg , wayland +, darwin }: +let + inherit (darwin.apple_sdk_11_0.frameworks) AVFoundation AppKit AudioUnit VideoToolbox; +in + stdenv.mkDerivation rec { pname = "moonlight-qt"; version = "4.3.1"; @@ -30,6 +35,8 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + patches = [ ./darwin.diff ]; + nativeBuildInputs = [ wrapQtAppsHook pkg-config @@ -40,17 +47,30 @@ stdenv.mkDerivation rec { qtquickcontrols2 SDL2 SDL2_ttf + openssl + libopus + ffmpeg + ] ++ lib.optionals stdenv.isLinux [ libva libvdpau libxkbcommon alsa-lib libpulseaudio - openssl - libopus - ffmpeg wayland + ] ++ lib.optionals stdenv.isDarwin [ + AVFoundation + AppKit + AudioUnit + VideoToolbox ]; + postInstall = lib.optionalString stdenv.isDarwin '' + mkdir $out/Applications $out/bin + mv app/Moonlight.app $out/Applications + rm -r $out/Applications/Moonlight.app/Contents/Frameworks + ln -s $out/Applications/Moonlight.app/Contents/MacOS/Moonlight $out/bin/moonlight + ''; + meta = with lib; { description = "Play your PC games on almost any device"; homepage = "https://moonlight-stream.org"; |