2023-08-22 20:05:09 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, qmake
|
2024-01-25 14:12:00 +00:00
|
|
|
, pkg-config
|
2023-08-22 20:05:09 +00:00
|
|
|
, qtbase
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qtwebsockets
|
|
|
|
, qtmultimedia
|
|
|
|
, gst_all_1
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, makeDesktopItem
|
|
|
|
, copyDesktopItems
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
, withVLC ? true , libvlc
|
|
|
|
, withMPV ? true , mpv-unwrapped
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "anilibria-winmaclinux";
|
2024-10-09 16:51:18 +00:00
|
|
|
version = "2.2.20";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "anilibria";
|
|
|
|
repo = "anilibria-winmaclinux";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = version;
|
2024-10-09 16:51:18 +00:00
|
|
|
hash = "sha256-Tdrs8WFv3ZoDL3U34l+NQp+oVJ6qxlVFg4YfwBSYlVg=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
qmakeFlags = [ "PREFIX=${placeholder "out"}" ]
|
|
|
|
++ lib.optionals withVLC [ "CONFIG+=unixvlc" ]
|
|
|
|
++ lib.optionals withMPV [ "CONFIG+=unixmpv" ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
patches = [
|
2023-10-09 19:29:22 +00:00
|
|
|
./0001-fix-installation-paths.patch
|
2023-08-22 20:05:09 +00:00
|
|
|
./0002-disable-version-check.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace AniLibria.pro \
|
2024-01-25 14:12:00 +00:00
|
|
|
--replace "\$\$PREFIX" '${placeholder "out"}'
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
qtWrapperArgs = [
|
|
|
|
"--prefix GST_PLUGIN_PATH : ${(with gst_all_1; lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
|
|
|
|
gst-plugins-bad
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-base
|
|
|
|
gst-libav
|
|
|
|
gstreamer
|
|
|
|
])}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
qmake
|
2024-01-25 14:12:00 +00:00
|
|
|
pkg-config
|
2023-08-22 20:05:09 +00:00
|
|
|
wrapQtAppsHook
|
|
|
|
copyDesktopItems
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtquickcontrols2
|
|
|
|
qtwebsockets
|
|
|
|
qtmultimedia
|
|
|
|
] ++ (with gst_all_1; [
|
|
|
|
gst-plugins-bad
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-base
|
|
|
|
gst-libav
|
|
|
|
gstreamer
|
2024-04-21 15:54:59 +00:00
|
|
|
])
|
|
|
|
++ lib.optionals withVLC [ libvlc ]
|
|
|
|
++ lib.optionals withMPV [ mpv-unwrapped.dev ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem (rec {
|
|
|
|
name = "AniLibria";
|
|
|
|
desktopName = name;
|
|
|
|
icon = "anilibria";
|
|
|
|
comment = meta.description;
|
|
|
|
genericName = "AniLibria desktop client";
|
|
|
|
categories = [ "Qt" "AudioVideo" "Player" ];
|
|
|
|
keywords = [ "anime" ];
|
|
|
|
exec = name;
|
|
|
|
terminal = false;
|
|
|
|
}))
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/anilibria/anilibria-winmaclinux";
|
|
|
|
description = "AniLibria cross platform desktop client";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ _3JlOy-PYCCKUi ];
|
|
|
|
inherit (qtbase.meta) platforms;
|
|
|
|
mainProgram = "AniLibria";
|
|
|
|
};
|
|
|
|
}
|