2022-05-23 06:27:25 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
2024-12-14 22:09:44 +01:00
|
|
|
replaceVars,
|
2024-07-21 21:34:06 +08:00
|
|
|
xapp,
|
2023-09-26 21:07:18 +08:00
|
|
|
circle-flags,
|
2022-05-23 06:27:25 +00:00
|
|
|
gettext,
|
|
|
|
gobject-introspection,
|
|
|
|
mpv,
|
|
|
|
python3,
|
2024-04-26 22:24:03 +02:00
|
|
|
wrapGAppsHook3,
|
2023-12-02 20:38:15 +08:00
|
|
|
yt-dlp,
|
2022-05-23 06:27:25 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hypnotix";
|
2025-08-01 00:06:59 +08:00
|
|
|
version = "5.1";
|
2022-05-23 06:27:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxmint";
|
|
|
|
repo = "hypnotix";
|
2025-04-08 02:51:45 -04:00
|
|
|
rev = version;
|
2025-08-01 00:06:59 +08:00
|
|
|
hash = "sha256-XXfZDFvHrGk+RFSQPldI/G4xhPm8lafZyBVCDtzvyoI=";
|
2022-05-23 06:27:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2024-12-14 22:09:44 +01:00
|
|
|
(replaceVars ./libmpv-path.patch {
|
2022-05-23 06:27:25 +00:00
|
|
|
libmpv = "${lib.getLib mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace usr/lib/hypnotix/hypnotix.py \
|
|
|
|
--replace __DEB_VERSION__ ${version} \
|
2023-12-02 20:38:15 +08:00
|
|
|
--replace /usr/bin/yt-dlp ${yt-dlp}/bin/yt-dlp \
|
2023-09-26 21:07:18 +08:00
|
|
|
--replace /usr/share/circle-flags-svg ${circle-flags}/share/circle-flags-svg \
|
2022-05-23 06:27:25 +00:00
|
|
|
--replace /usr/share/hypnotix $out/share/hypnotix
|
2023-12-02 20:38:15 +08:00
|
|
|
|
|
|
|
substituteInPlace usr/bin/hypnotix \
|
|
|
|
--replace /usr/lib/hypnotix/hypnotix.py $out/lib/hypnotix/hypnotix.py
|
2022-05-23 06:27:25 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
python3.pkgs.wrapPython
|
2024-04-26 22:24:03 +02:00
|
|
|
wrapGAppsHook3
|
2022-05-23 06:27:25 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-07-21 21:34:06 +08:00
|
|
|
xapp
|
2023-12-02 20:38:15 +08:00
|
|
|
python3 # for patchShebangs
|
2022-05-23 06:27:25 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonPath = with python3.pkgs; [
|
2022-08-08 17:02:01 -03:00
|
|
|
cinemagoer
|
2022-05-23 06:27:25 +00:00
|
|
|
pygobject3
|
|
|
|
requests
|
|
|
|
setproctitle
|
|
|
|
unidecode
|
2024-07-19 23:28:25 +08:00
|
|
|
python-xapp
|
2022-05-23 06:27:25 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
2023-12-02 20:38:15 +08:00
|
|
|
cp -r usr/* $out
|
2022-05-23 06:27:25 +00:00
|
|
|
|
|
|
|
glib-compile-schemas $out/share/glib-2.0/schemas
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
buildPythonPath "$out $pythonPath"
|
2023-12-02 20:38:15 +08:00
|
|
|
|
|
|
|
# yt-dlp is needed for mpv to play YouTube channels.
|
|
|
|
wrapProgram $out/bin/hypnotix \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ yt-dlp ]}" \
|
2022-05-23 06:27:25 +00:00
|
|
|
--prefix PYTHONPATH : "$program_PYTHONPATH" \
|
|
|
|
''${gappsWrapperArgs[@]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "IPTV streaming application";
|
|
|
|
homepage = "https://github.com/linuxmint/hypnotix";
|
2022-06-15 19:13:35 +00:00
|
|
|
changelog = "https://github.com/linuxmint/hypnotix/blob/${src.rev}/debian/changelog";
|
2022-05-23 06:27:25 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2022-11-01 17:24:40 +08:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
dotlambda
|
|
|
|
bobby285271
|
|
|
|
];
|
2022-05-23 06:27:25 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2023-11-27 02:17:53 +01:00
|
|
|
mainProgram = "hypnotix";
|
2022-05-23 06:27:25 +00:00
|
|
|
};
|
|
|
|
}
|