Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchFromGitLab, 5 fetchpatch, 6 cmake, 7 qtbase, 8 qtdeclarative, 9 qtmultimedia, 10 quazip, 11 rlottie, 12}: 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "rlottie-qml"; 16 version = "0-unstable-2021-05-03"; 17 18 src = fetchFromGitLab { 19 owner = "mymike00"; 20 repo = "rlottie-qml"; 21 rev = "f9506889a284039888c7a43db37e155bb7b30c40"; 22 hash = "sha256-e2/4e1GGFfJMwShy6qgnUVVRxjV4WfjQwcqs09RK194="; 23 }; 24 25 outputs = [ 26 "out" 27 "dev" 28 ]; 29 30 patches = [ 31 # Remove when https://gitlab.com/mymike00/rlottie-qml/-/merge_requests/1 merged 32 (fetchpatch { 33 name = "0001-rlottie-qml-Use-upstream-QuaZip-config-module.patch"; 34 url = "https://gitlab.com/mymike00/rlottie-qml/-/commit/5656211dd8ae190795e343f47a3393fd3d8d25a4.patch"; 35 hash = "sha256-t2NlYVU+D8hKd+AvBWPEavAhJKlk7Q3y2iAQSYtks5k="; 36 }) 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 ]; 51 52 buildInputs = [ 53 rlottie 54 qtbase 55 qtdeclarative 56 qtmultimedia 57 ]; 58 59 propagatedBuildInputs = [ 60 # Config module requires this 61 quazip 62 ]; 63 64 # Only a QML module 65 dontWrapQtApps = true; 66 67 meta = with lib; { 68 description = "Library for using rlottie via QML"; 69 homepage = "https://gitlab.com/mymike00/rlottie-qml"; 70 license = licenses.gpl3Only; 71 maintainers = with maintainers; [ OPNA2608 ]; 72 platforms = platforms.all; 73 }; 74})