anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / development / libraries / rlottie-qml / default.nix
blob5154c816624e72d3a47ec69ccf176529f70cc419
1 { stdenv
2 , lib
3 , fetchFromGitLab
4 , fetchpatch
5 , cmake
6 , qtbase
7 , qtdeclarative
8 , qtmultimedia
9 , quazip
10 , rlottie
13 stdenv.mkDerivation (finalAttrs: {
14   pname = "rlottie-qml";
15   version = "0-unstable-2021-05-03";
17   src = fetchFromGitLab {
18     owner = "mymike00";
19     repo = "rlottie-qml";
20     rev = "f9506889a284039888c7a43db37e155bb7b30c40";
21     hash = "sha256-e2/4e1GGFfJMwShy6qgnUVVRxjV4WfjQwcqs09RK194=";
22   };
24   outputs = [
25     "out"
26     "dev"
27   ];
29   patches = [
30     # Remove when https://gitlab.com/mymike00/rlottie-qml/-/merge_requests/1 merged
31     (fetchpatch {
32       name = "0001-rlottie-qml-Use-upstream-QuaZip-config-module.patch";
33       url = "https://gitlab.com/mymike00/rlottie-qml/-/commit/5656211dd8ae190795e343f47a3393fd3d8d25a4.patch";
34       hash = "sha256-t2NlYVU+D8hKd+AvBWPEavAhJKlk7Q3y2iAQSYtks5k=";
35     })
36   ];
38   postPatch = ''
39     # Fix QML install path
40     substituteInPlace CMakeLists.txt \
41       --replace-fail 'QT_IMPORTS_DIR "/lib/''${ARCH_TRIPLET}"' 'QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"' \
42       --replace-fail "\''${QT_IMPORTS_DIR}/\''${PLUGIN}" "\''${QT_IMPORTS_DIR}" \
43   '';
45   strictDeps = true;
47   nativeBuildInputs = [
48     cmake
49   ];
51   buildInputs = [
52     rlottie
53     qtbase
54     qtdeclarative
55     qtmultimedia
56   ];
58   propagatedBuildInputs = [
59     # Config module requires this
60     quazip
61   ];
63   # Only a QML module
64   dontWrapQtApps = true;
66   meta = with lib; {
67     description = "Library for using rlottie via QML";
68     homepage = "https://gitlab.com/mymike00/rlottie-qml";
69     license = licenses.gpl3Only;
70     maintainers = with maintainers; [ OPNA2608 ];
71     platforms = platforms.all;
72   };