Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 mkDerivation, 3 lib, 4 fetchFromGitHub, 5 qmake, 6 pkg-config, 7 qtbase, 8 qtquickcontrols2, 9 qtwebsockets, 10 qtmultimedia, 11 gst_all_1, 12 wrapQtAppsHook, 13 makeDesktopItem, 14 copyDesktopItems, 15 16 withVLC ? true, 17 libvlc, 18 withMPV ? true, 19 mpv-unwrapped, 20}: 21 22mkDerivation rec { 23 pname = "anilibria-winmaclinux"; 24 version = "2.2.28"; 25 26 src = fetchFromGitHub { 27 owner = "anilibria"; 28 repo = "anilibria-winmaclinux"; 29 rev = version; 30 hash = "sha256-dBeIFmlhxfb7wT3zAK7ALYOqs0dFv2xg+455tCqjyEo="; 31 }; 32 33 sourceRoot = "${src.name}/src"; 34 35 qmakeFlags = [ 36 "PREFIX=${placeholder "out"}" 37 ] 38 ++ lib.optionals withVLC [ "CONFIG+=unixvlc" ] 39 ++ lib.optionals withMPV [ "CONFIG+=unixmpv" ]; 40 41 patches = [ 42 ./0001-fix-installation-paths.patch 43 ./0002-disable-version-check.patch 44 ]; 45 46 preConfigure = '' 47 substituteInPlace AniLibria.pro \ 48 --replace "\$\$PREFIX" '${placeholder "out"}' 49 ''; 50 51 qtWrapperArgs = [ 52 "--prefix GST_PLUGIN_PATH : ${ 53 ( 54 with gst_all_1; 55 lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [ 56 gst-plugins-bad 57 gst-plugins-good 58 gst-plugins-base 59 gst-libav 60 gstreamer 61 ] 62 ) 63 }" 64 ]; 65 66 nativeBuildInputs = [ 67 qmake 68 pkg-config 69 wrapQtAppsHook 70 copyDesktopItems 71 ]; 72 73 buildInputs = [ 74 qtbase 75 qtquickcontrols2 76 qtwebsockets 77 qtmultimedia 78 ] 79 ++ (with gst_all_1; [ 80 gst-plugins-bad 81 gst-plugins-good 82 gst-plugins-base 83 gst-libav 84 gstreamer 85 ]) 86 ++ lib.optionals withVLC [ libvlc ] 87 ++ lib.optionals withMPV [ mpv-unwrapped.dev ]; 88 89 desktopItems = [ 90 (makeDesktopItem (rec { 91 name = "AniLibria"; 92 desktopName = name; 93 icon = "anilibria"; 94 comment = meta.description; 95 genericName = "AniLibria desktop client"; 96 categories = [ 97 "Qt" 98 "AudioVideo" 99 "Player" 100 ]; 101 keywords = [ "anime" ]; 102 exec = name; 103 terminal = false; 104 })) 105 ]; 106 107 meta = with lib; { 108 homepage = "https://github.com/anilibria/anilibria-winmaclinux"; 109 description = "AniLibria cross platform desktop client"; 110 license = licenses.gpl3; 111 maintainers = with maintainers; [ _3JlOy-PYCCKUi ]; 112 inherit (qtbase.meta) platforms; 113 mainProgram = "AniLibria"; 114 }; 115}