nixpkgs/pkgs/by-name/mo/moonlight-qt/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

101 lines
2.1 KiB
Nix
Raw Normal View History

{
stdenv,
lib,
fetchFromGitHub,
2024-07-05 02:03:23 +01:00
fetchpatch,
qt6,
pkg-config,
vulkan-headers,
SDL2,
SDL2_ttf,
ffmpeg,
libopus,
libplacebo,
openssl,
alsa-lib,
libpulseaudio,
libva,
libvdpau,
libxkbcommon,
wayland,
libdrm,
apple-sdk_11,
nix-update-script,
2021-03-22 19:45:45 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
2021-03-22 19:45:45 +00:00
pname = "moonlight-qt";
version = "6.1.0";
2021-03-22 19:45:45 +00:00
src = fetchFromGitHub {
owner = "moonlight-stream";
repo = "moonlight-qt";
rev = "v${finalAttrs.version}";
hash = "sha256-rWVNpfRDLrWsqELPFquA6rW6/AfWV+6DNLUCPqIhle0=";
2021-03-22 19:45:45 +00:00
fetchSubmodules = true;
};
2024-07-05 02:03:23 +01:00
patches = [
# Fix build for Xcode < 14
2024-07-05 02:03:23 +01:00
(fetchpatch {
url = "https://github.com/moonlight-stream/moonlight-qt/commit/76deafbd7bf868562d69061e7d6abf2612a2c7ad.patch";
hash = "sha256-+rXdexZQpOP6yS+oTmvYVxasWxOX16uU1udN75zNX3w=";
2024-07-05 02:03:23 +01:00
})
];
2021-03-22 19:45:45 +00:00
nativeBuildInputs = [
2024-07-05 02:03:23 +01:00
qt6.qmake
qt6.wrapQtAppsHook
2021-03-22 19:45:45 +00:00
pkg-config
vulkan-headers
2021-03-22 19:45:45 +00:00
];
buildInputs =
[
(SDL2.override { drmSupport = stdenv.hostPlatform.isLinux; })
SDL2_ttf
ffmpeg
libopus
libplacebo
2024-07-05 02:03:23 +01:00
qt6.qtdeclarative
qt6.qtsvg
openssl
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libpulseaudio
libva
libvdpau
libxkbcommon
2024-07-05 02:03:23 +01:00
qt6.qtwayland
wayland
libdrm
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_11
];
2021-03-22 19:45:45 +00:00
qmakeFlags = [ "CONFIG+=disable-prebuilts" ];
2023-06-30 00:29:24 +01:00
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications $out/bin
mv app/Moonlight.app $out/Applications
ln -s $out/Applications/Moonlight.app/Contents/MacOS/Moonlight $out/bin/moonlight
'';
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/moonlight-stream/moonlight-qt/releases/tag/v${finalAttrs.version}";
2021-03-22 19:45:45 +00:00
description = "Play your PC games on almost any device";
homepage = "https://moonlight-stream.org";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
2024-06-30 12:43:52 +01:00
azuwis
zmitchell
];
platforms = lib.platforms.all;
2022-03-17 10:42:08 +00:00
mainProgram = "moonlight";
2021-03-22 19:45:45 +00:00
};
})