about summary refs log tree commit diff
path: root/pkgs/applications/video/anilibria-winmaclinux
diff options
context:
space:
mode:
author3JlOy_PYCCKUI <3jl0y_pycckui@riseup.net>2023-07-12 23:51:13 +0300
committer3JlOy_PYCCKUI <3jl0y_pycckui@riseup.net>2023-08-17 16:19:33 +0300
commita68a6b0b7e138ffd7ceea58de6f1eb6f479ae1e6 (patch)
treedca9e4d77f29e428b8a158f871d17f583ffebf4f /pkgs/applications/video/anilibria-winmaclinux
parenteb2b0b09b37422ce4dcff464df6488131b12998a (diff)
anilibria-winmaclinux: init at 1.2.9
Diffstat (limited to 'pkgs/applications/video/anilibria-winmaclinux')
-rw-r--r--pkgs/applications/video/anilibria-winmaclinux/0001-fix-instalation-paths.patch24
-rw-r--r--pkgs/applications/video/anilibria-winmaclinux/0002-disable-version-check.patch12
-rw-r--r--pkgs/applications/video/anilibria-winmaclinux/default.nix91
3 files changed, 127 insertions, 0 deletions
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 0000000000000..14f9799e46bdc
--- /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 0000000000000..f8f00f15be1c0
--- /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 0000000000000..823dbfef97a94
--- /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";
+  };
+}