Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 105 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 wrapGAppsHook3, 8 wrapQtAppsHook, 9 gst_all_1, 10 qtbase, 11 qtsvg, 12 qtmultimedia, 13 qttools, 14 qtwayland, 15 zlib, 16 # only required when using poppler 17 poppler, 18 # only required when using mupdf 19 freetype, 20 gumbo, 21 jbig2dec, 22 mupdf, 23 openjpeg, 24 # choose renderer: mupdf or poppler or both (not recommended) 25 usePoppler ? false, 26 useMupdf ? true, 27 useExternalRenderer ? false, 28}: 29 30stdenv.mkDerivation rec { 31 pname = "beamerpresenter"; 32 version = "0.2.6"; 33 34 src = fetchFromGitHub { 35 owner = "stiglers-eponym"; 36 repo = "BeamerPresenter"; 37 rev = "v${version}"; 38 hash = "sha256-sPeWlPkWOPfLAoAC/+T7nyhPqvoaZg6aMOIVLjMqd2k="; 39 }; 40 41 nativeBuildInputs = [ 42 cmake 43 pkg-config 44 wrapGAppsHook3 45 wrapQtAppsHook 46 ]; 47 48 dontWrapGApps = true; 49 50 buildInputs = [ 51 gst_all_1.gst-libav 52 gst_all_1.gst-plugins-base 53 gst_all_1.gst-plugins-good 54 zlib 55 qtbase 56 qtsvg 57 qtmultimedia 58 qttools 59 ] 60 ++ lib.optionals stdenv.hostPlatform.isLinux [ 61 qtwayland 62 ] 63 ++ lib.optionals useMupdf [ 64 freetype 65 gumbo 66 jbig2dec 67 mupdf 68 openjpeg 69 ] 70 ++ lib.optionals usePoppler [ 71 poppler 72 ]; 73 74 cmakeFlags = [ 75 "-DGIT_VERSION=OFF" 76 "-DUSE_POPPLER=${if usePoppler then "ON" else "OFF"}" 77 "-DUSE_MUPDF=${if useMupdf then "ON" else "OFF"}" 78 "-DUSE_QTPDF=OFF" 79 "-DLINK_MUPDF_THIRD=OFF" 80 "-DUSE_EXTERNAL_RENDERER=${if useExternalRenderer then "ON" else "OFF"}" 81 "-DLINK_MUJS=OFF" 82 "-DLINK_GUMBO=ON" 83 "-DUSE_TRANSLATIONS=ON" 84 "-DQT_VERSION_MAJOR=${lib.versions.major qtbase.version}" 85 ]; 86 87 preFixup = '' 88 qtWrapperArgs+=("''${gappsWrapperArgs[@]}") 89 ''; 90 91 meta = with lib; { 92 description = "Modular multi screen pdf presentation viewer"; 93 homepage = "https://github.com/stiglers-eponym/BeamerPresenter"; 94 license = with licenses; [ 95 agpl3Only 96 gpl3Plus 97 ]; 98 platforms = platforms.all; 99 maintainers = with maintainers; [ 100 euxane 101 dotlambda 102 ]; 103 mainProgram = "beamerpresenter"; 104 }; 105}