Merge pull request #231386 from Enzime/syncplay-darwin

syncplay: use Qt6 for macOS
This commit is contained in:
Weijia Wang 2023-05-12 10:25:35 +03:00 committed by GitHub
commit 7c4b8228b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,18 @@
{ lib, fetchFromGitHub, buildPythonApplication, pyside2, twisted, certifi, qt5, enableGUI ? true }:
{ lib
, stdenv
, fetchFromGitHub
, buildPythonApplication
, pyside6
, twisted
, certifi
, qt6
, appnope
, enableGUI ? true
}:
buildPythonApplication rec {
pname = "syncplay";
version = "1.6.9";
version = "1.7.0";
format = "other";
@ -10,14 +20,15 @@ buildPythonApplication rec {
owner = "Syncplay";
repo = "syncplay";
rev = "v${version}";
sha256 = "0qm3qn4a1nahhs7q81liz514n9blsi107g9s9xfw2i8pzi7v9v0v";
sha256 = "sha256-Te81yOv3D6M6aMfC5XrM6/I6BlMdlY1yRk1RRJa9Mxg=";
};
buildInputs = lib.optionals enableGUI [ qt5.qtwayland ];
buildInputs = lib.optionals enableGUI [ (if stdenv.isLinux then qt6.qtwayland else qt6.qtbase) ];
propagatedBuildInputs = [ twisted certifi ]
++ twisted.optional-dependencies.tls
++ lib.optional enableGUI pyside2;
nativeBuildInputs = lib.optionals enableGUI [ qt5.wrapQtAppsHook ];
++ lib.optional enableGUI pyside6
++ lib.optional (stdenv.isDarwin && enableGUI) appnope;
nativeBuildInputs = lib.optionals enableGUI [ qt6.wrapQtAppsHook ];
makeFlags = [ "DESTDIR=" "PREFIX=$(out)" ];
@ -29,7 +40,7 @@ buildPythonApplication rec {
homepage = "https://syncplay.pl/";
description = "Free software that synchronises media players";
license = licenses.asl20;
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ Enzime ];
};
}