nixpkgs/pkgs/applications/networking/syncplay/default.nix

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

58 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, buildPythonApplication
2023-05-25 23:32:37 +00:00
, fetchpatch
, pem
, pyside6
, twisted
, certifi
, qt6
, appnope
, enableGUI ? true
}:
2017-12-12 08:59:33 +00:00
buildPythonApplication rec {
pname = "syncplay";
2023-05-12 00:17:58 +00:00
version = "1.7.0";
2017-12-12 08:59:33 +00:00
format = "other";
src = fetchFromGitHub {
owner = "Syncplay";
repo = "syncplay";
rev = "v${version}";
2023-05-12 00:17:58 +00:00
sha256 = "sha256-Te81yOv3D6M6aMfC5XrM6/I6BlMdlY1yRk1RRJa9Mxg=";
2017-12-12 08:59:33 +00:00
};
2023-05-25 23:32:37 +00:00
patches = [
(fetchpatch {
name = "fix-typeerror.patch";
url = "https://github.com/Syncplay/syncplay/commit/b62b038cdf58c54205987dfc52ebf228505ad03b.patch";
hash = "sha256-pSP33Qn1I+nJBW8T1E1tSJKRh5OnZMRsbU+jr5z4u7c=";
})
./trusted_certificates.patch
2023-05-25 23:32:37 +00:00
];
buildInputs = lib.optionals enableGUI [ (if stdenv.isLinux then qt6.qtwayland else qt6.qtbase) ];
propagatedBuildInputs = [ certifi pem twisted ]
++ twisted.optional-dependencies.tls
++ lib.optional enableGUI pyside6
++ lib.optional (stdenv.isDarwin && enableGUI) appnope;
nativeBuildInputs = lib.optionals enableGUI [ qt6.wrapQtAppsHook ];
2017-12-12 08:59:33 +00:00
makeFlags = [ "DESTDIR=" "PREFIX=$(out)" ];
2017-12-12 08:59:33 +00:00
postFixup = lib.optionalString enableGUI ''
2019-12-19 20:52:32 +00:00
wrapQtApp $out/bin/syncplay
'';
meta = with lib; {
homepage = "https://syncplay.pl/";
2017-12-12 08:59:33 +00:00
description = "Free software that synchronises media players";
license = licenses.asl20;
platforms = platforms.linux ++ platforms.darwin;
2021-12-18 14:59:15 +00:00
maintainers = with maintainers; [ Enzime ];
2017-12-12 08:59:33 +00:00
};
}