Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 77 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 libsForQt5, 7 writableTmpDirAsHomeHook, 8 ffmpeg-headless, 9 nix-update-script, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "mlv-app"; 14 version = "1.15"; 15 16 src = fetchFromGitHub { 17 owner = "ilia3101"; 18 repo = "MLV-App"; 19 rev = "QTv${finalAttrs.version}"; 20 hash = "sha256-boYnIGDowV4yRxdE98U5ngeAwqi5HTRDFh5gVwW/kN8="; 21 }; 22 23 patches = [ 24 (fetchpatch { 25 url = "https://github.com/ilia3101/MLV-App/commit/b7643b1031955f085ade30e27974ddd889a4641f.patch"; 26 hash = "sha256-DQkoB+fjshWDLzKouhEQXzpqn78WL+eqo5oTfE9ltEk="; 27 }) 28 ]; 29 30 postPatch = '' 31 substituteInPlace platform/qt/MainWindow.cpp \ 32 --replace-fail '"ffmpeg"' '"${lib.getExe ffmpeg-headless}"' 33 ''; 34 35 qmakeFlags = [ "MLVApp.pro" ]; 36 37 preConfigure = '' 38 cd platform/qt/ 39 ''; 40 41 nativeBuildInputs = [ 42 libsForQt5.wrapQtAppsHook 43 libsForQt5.qmake 44 writableTmpDirAsHomeHook 45 ]; 46 buildInputs = [ 47 libsForQt5.qtmultimedia 48 libsForQt5.qtbase 49 ]; 50 51 dontWrapQtApps = true; 52 53 preFixup = '' 54 wrapQtApp "$out/bin/mlvapp" 55 ''; 56 57 installPhase = '' 58 runHook preInstall 59 install -Dm555 -t $out/bin mlvapp 60 install -Dm444 -t $out/share/applications mlvapp.desktop 61 install -Dm444 -t $out/share/icons/hicolor/512x512/apps RetinaIMG/MLVAPP.png 62 runHook postInstall 63 ''; 64 65 updateScript = nix-update-script { }; 66 67 meta = { 68 description = "All in one MLV processing app that is pretty great"; 69 homepage = "https://mlv.app"; 70 downloadPage = "https://github.com/ilia3101/MLV-App"; 71 changelog = "https://github.com/ilia3101/MLV-App/releases/tag/QTv${finalAttrs.version}"; 72 license = lib.licenses.gpl3Only; 73 maintainers = [ ]; 74 platforms = [ "x86_64-linux" ]; 75 mainProgram = "mlvapp"; 76 }; 77})