diff --git a/pkgs/applications/video/anilibria-winmaclinux/0001-fix-instalation-paths.patch b/pkgs/applications/video/anilibria-winmaclinux/0001-fix-instalation-paths.patch new file mode 100644 index 000000000000..14f9799e46bd --- /dev/null +++ b/pkgs/applications/video/anilibria-winmaclinux/0001-fix-instalation-paths.patch @@ -0,0 +1,24 @@ +diff --git a/AniLibria.pro b/AniLibria.pro +index 3eb7213..ea571ff 100644 +--- a/AniLibria.pro ++++ b/AniLibria.pro +@@ -271,17 +271,8 @@ QML_IMPORT_PATH = + # Additional import path used to resolve QML modules just for Qt Quick Designer + QML_DESIGNER_IMPORT_PATH = + +-# Default rules for deployment. +-!flatpak{ +- qnx: target.path = /tmp/$${TARGET}/bin +- else: unix:!android: target.path = /opt/$${TARGET}/bin +-}else{ +- target.path = $$PREFIX/bin +-} +-!isEmpty(target.path) { +- unix: INSTALLS += target desktop $${UNIX_ICONS} +- else:macx: INSTALLS += target +-} ++target.path = $$PREFIX/bin ++INSTALLS += target $${UNIX_ICONS} + + flatpak { + metadata.path = $$PREFIX/share/metainfo diff --git a/pkgs/applications/video/anilibria-winmaclinux/0002-disable-version-check.patch b/pkgs/applications/video/anilibria-winmaclinux/0002-disable-version-check.patch new file mode 100644 index 000000000000..f8f00f15be1c --- /dev/null +++ b/pkgs/applications/video/anilibria-winmaclinux/0002-disable-version-check.patch @@ -0,0 +1,12 @@ +diff --git a/AniLibria.pro b/AniLibria.pro +index 3eb7213..3d39ec9 100644 +--- a/AniLibria.pro ++++ b/AniLibria.pro +@@ -174,7 +174,6 @@ unix { + DEFINES += QT_DEPRECATED_WARNINGS + + # If you need not check version remove or comment this line +-DEFINES += USE_VERSION_CHECK + + # You can also make your code fail to compile if it uses deprecated APIs. + # In order to do so, uncomment the following line. diff --git a/pkgs/applications/video/anilibria-winmaclinux/default.nix b/pkgs/applications/video/anilibria-winmaclinux/default.nix new file mode 100644 index 000000000000..823dbfef97a9 --- /dev/null +++ b/pkgs/applications/video/anilibria-winmaclinux/default.nix @@ -0,0 +1,91 @@ +{ mkDerivation +, lib +, fetchFromGitHub +, qmake +, qtbase +, qtquickcontrols2 +, qtwebsockets +, qtmultimedia +, gst_all_1 +, wrapQtAppsHook +, makeDesktopItem +, copyDesktopItems +}: + +mkDerivation rec { + pname = "anilibria-winmaclinux"; + version = "1.2.9"; + + src = fetchFromGitHub { + owner = "anilibria"; + repo = "anilibria-winmaclinux"; + rev = version; + sha256 = "sha256-Fdj7i4jpKIDwaIBAch7SjIV/WnqMDnCfNYSiZLsamx8="; + }; + + sourceRoot = "source/src"; + + qmakeFlags = [ "PREFIX=${placeholder "out"}" ]; + + patches = [ + ./0001-fix-instalation-paths.patch + ./0002-disable-version-check.patch + ]; + + preConfigure = '' + substituteInPlace AniLibria.pro \ + --replace "\$\$PREFIX" '${placeholder "out"}' + ''; + + 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 + wrapQtAppsHook + copyDesktopItems + ]; + + buildInputs = [ + qtbase + qtquickcontrols2 + qtwebsockets + qtmultimedia + ] ++ (with gst_all_1; [ + gst-plugins-bad + gst-plugins-good + gst-plugins-base + gst-libav + gstreamer + ]); + + 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"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f866a1ae62ea..205e69cc2d36 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30291,6 +30291,8 @@ with pkgs; appvm = callPackage ../applications/virtualization/appvm { }; + anilibria-winmaclinux = libsForQt5.callPackage ../applications/video/anilibria-winmaclinux { }; + yggdrasil = callPackage ../tools/networking/yggdrasil { }; masterpdfeditor = libsForQt5.callPackage ../applications/misc/masterpdfeditor { };