2023-01-08 11:49:23 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, cmake
|
|
|
|
, zlib
|
|
|
|
, potrace
|
|
|
|
, ffmpeg
|
|
|
|
, libarchive
|
|
|
|
, python3
|
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, wrapQtAppsHook
|
2023-01-08 21:26:26 +01:00
|
|
|
, testers
|
2023-01-09 10:38:26 +01:00
|
|
|
, qtsvg
|
|
|
|
, qtimageformats
|
2023-01-10 11:43:38 +01:00
|
|
|
# For the tests
|
2023-01-09 10:38:26 +01:00
|
|
|
, glaxnimate # Call itself, for the tests
|
2023-01-09 10:50:49 +01:00
|
|
|
, xvfb-run
|
2023-01-08 11:49:23 +01:00
|
|
|
}:
|
2023-01-09 10:38:26 +01:00
|
|
|
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
|
2023-01-08 11:49:23 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "glaxnimate";
|
|
|
|
version = "0.5.1";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "mattbas";
|
|
|
|
repo = "${pname}";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "G4ykcOvXXnVIQZUYpRIrALtDSsGqxMvDtcmobjjtlKw=";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
2023-01-09 10:53:53 +01:00
|
|
|
|
2023-01-08 11:49:23 +01:00
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
potrace
|
2023-01-09 06:27:37 +01:00
|
|
|
# Upstream asks for libav dependency, which is fulfilled by ffmpeg
|
2023-01-08 11:49:23 +01:00
|
|
|
ffmpeg
|
|
|
|
libarchive
|
|
|
|
qtbase
|
|
|
|
qttools
|
2023-01-09 10:38:26 +01:00
|
|
|
qtsvg
|
|
|
|
qtimageformats
|
|
|
|
python3WithLibs
|
2023-01-08 11:49:23 +01:00
|
|
|
];
|
|
|
|
|
2023-01-09 10:38:26 +01:00
|
|
|
qtWrapperArgs = [ ''--prefix PATH : ${python3WithLibs}/bin'' ];
|
2023-01-09 10:53:53 +01:00
|
|
|
|
2023-01-10 11:43:38 +01:00
|
|
|
passthru.tests.version = lib.optionalAttrs stdenv.isLinux (testers.testVersion {
|
2023-01-08 21:26:10 +01:00
|
|
|
package = glaxnimate;
|
2023-01-09 10:50:49 +01:00
|
|
|
command = "${xvfb-run}/bin/xvfb-run glaxnimate --version";
|
2023-01-10 11:43:38 +01:00
|
|
|
});
|
2023-01-09 10:38:26 +01:00
|
|
|
|
2023-01-08 11:49:23 +01:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gitlab.com/mattbas/glaxnimate";
|
|
|
|
description = "Simple vector animation program.";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ tobiasBora ];
|
|
|
|
};
|
|
|
|
}
|