about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-01-09 12:01:24 +0000
committerGitHub <noreply@github.com>2023-01-09 12:01:24 +0000
commite4fc9a910a15ce7c5b51b4e28d304dd985eceeb3 (patch)
tree4b3653d78b874aa712b2459acaa8956c1cb31042 /pkgs/applications/video
parent99dd0da8dc6177990d4d2c149baf92f7fed49703 (diff)
parentaa3dc8b8c316e2f9d6dc6b4659ce9fb90fccca28 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/glaxnimate/default.nix81
1 files changed, 81 insertions, 0 deletions
diff --git a/pkgs/applications/video/glaxnimate/default.nix b/pkgs/applications/video/glaxnimate/default.nix
new file mode 100644
index 0000000000000..2fdb82869f3bd
--- /dev/null
+++ b/pkgs/applications/video/glaxnimate/default.nix
@@ -0,0 +1,81 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, cmake
+, zlib
+, potrace
+, ffmpeg
+, libarchive
+, python3
+, qtbase
+, qttools
+, wrapQtAppsHook
+, testers
+, qtsvg
+, qtimageformats
+# For the tests
+, glaxnimate # Call itself, for the tests
+, xvfb-run
+}:
+let
+  # TODO: try to add a python library, see toPythonModule in doc/languages-frameworks/python.section.md
+  python3WithLibs = python3.withPackages (ps: with ps; [
+    # In data/lib/python-lottie/requirements.txt
+    numpy
+    pillow
+    cairosvg
+    fonttools
+    grapheme
+    opencv4
+    pyqt5
+    qscintilla
+    # Not sure if needed, but appears in some files
+    pyyaml
+    requests
+    pybind11
+  ]);
+in
+stdenv.mkDerivation rec {
+  pname = "glaxnimate";
+  version = "0.5.1";
+
+  src = fetchFromGitLab {
+    owner = "mattbas";
+    repo = "${pname}";
+    rev = "${version}";
+    sha256 = "G4ykcOvXXnVIQZUYpRIrALtDSsGqxMvDtcmobjjtlKw=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    zlib
+    potrace
+    # Upstream asks for libav dependency, which is fulfilled by ffmpeg
+    ffmpeg
+    libarchive
+    qtbase
+    qttools
+    qtsvg
+    qtimageformats
+    python3WithLibs
+  ];
+
+  qtWrapperArgs = [ ''--prefix PATH : ${python3WithLibs}/bin'' ];
+
+  passthru.tests.version = testers.testVersion {
+    package = glaxnimate;
+    command = "${xvfb-run}/bin/xvfb-run glaxnimate --version";
+  };
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/mattbas/glaxnimate";
+    description = "Simple vector animation program.";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ tobiasBora ];
+  };
+}