nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 buildPythonApplication,
6 pem,
7 pyside6,
8 twisted,
9 certifi,
10 qt6,
11 appnope,
12 enableGUI ? true,
13}:
14
15buildPythonApplication rec {
16 pname = "syncplay";
17 version = "1.7.4";
18
19 format = "other";
20
21 src = fetchFromGitHub {
22 owner = "Syncplay";
23 repo = "syncplay";
24 tag = "v${version}";
25 sha256 = "sha256-23OTj+KUmYtrhzIS4A9Gq/tClOLwaeo50+Fcm1tn47M=";
26 };
27
28 patches = [
29 ./trusted_certificates.patch
30 ];
31
32 buildInputs = lib.optionals enableGUI [
33 (if stdenv.hostPlatform.isLinux then qt6.qtwayland else qt6.qtbase)
34 ];
35 propagatedBuildInputs =
36 [
37 certifi
38 pem
39 twisted
40 ]
41 ++ twisted.optional-dependencies.tls
42 ++ lib.optional enableGUI pyside6
43 ++ lib.optional (stdenv.hostPlatform.isDarwin && enableGUI) appnope;
44 nativeBuildInputs = lib.optionals enableGUI [ qt6.wrapQtAppsHook ];
45
46 makeFlags = [
47 "DESTDIR="
48 "PREFIX=$(out)"
49 ];
50
51 postFixup = lib.optionalString enableGUI ''
52 wrapQtApp $out/bin/syncplay
53 '';
54
55 meta = with lib; {
56 homepage = "https://syncplay.pl/";
57 description = "Free software that synchronises media players";
58 license = licenses.asl20;
59 platforms = platforms.linux ++ platforms.darwin;
60 maintainers = with maintainers; [ assistant ];
61 };
62}