nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitLab,
5 fetchpatch,
6 cmake,
7 pkg-config,
8 qtbase,
9 qtdeclarative,
10 qtmultimedia,
11 quazip,
12 rlottie,
13}:
14
15stdenv.mkDerivation (finalAttrs: {
16 pname = "rlottie-qml";
17 version = "0-unstable-2021-05-03";
18
19 src = fetchFromGitLab {
20 owner = "mymike00";
21 repo = "rlottie-qml";
22 rev = "f9506889a284039888c7a43db37e155bb7b30c40";
23 hash = "sha256-e2/4e1GGFfJMwShy6qgnUVVRxjV4WfjQwcqs09RK194=";
24 };
25
26 outputs = [
27 "out"
28 "dev"
29 ];
30
31 patches = [
32 # Remove when https://gitlab.com/mymike00/rlottie-qml/-/merge_requests/1 merged
33 ./1001-Use-upstream-QuaZip-CMake-config.patch
34
35 # Remove when https://gitlab.com/mymike00/rlottie-qml/-/merge_requests/3 merged
36 ./1002-Find-rlottie-via-pkg-config.patch
37 ];
38
39 postPatch = ''
40 # Fix QML install path
41 substituteInPlace CMakeLists.txt \
42 --replace-fail 'QT_IMPORTS_DIR "/lib/''${ARCH_TRIPLET}"' 'QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"' \
43 --replace-fail "\''${QT_IMPORTS_DIR}/\''${PLUGIN}" "\''${QT_IMPORTS_DIR}" \
44 '';
45
46 strictDeps = true;
47
48 nativeBuildInputs = [
49 cmake
50 pkg-config
51 ];
52
53 buildInputs = [
54 rlottie
55 qtbase
56 qtdeclarative
57 qtmultimedia
58 ];
59
60 propagatedBuildInputs = [
61 # Config module requires this
62 quazip
63 ];
64
65 # Only a QML module
66 dontWrapQtApps = true;
67
68 meta = {
69 description = "Library for using rlottie via QML";
70 homepage = "https://gitlab.com/mymike00/rlottie-qml";
71 license = lib.licenses.gpl3Only;
72 maintainers = with lib.maintainers; [ OPNA2608 ];
73 platforms = lib.platforms.all;
74 };
75})