2022-06-30 01:26:04 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, wrapGAppsHook
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, gst_all_1
|
|
|
|
, qtbase
|
|
|
|
, qtmultimedia
|
|
|
|
, qttools
|
|
|
|
, qtwayland
|
|
|
|
, zlib
|
|
|
|
# only required when using poppler
|
|
|
|
, poppler
|
|
|
|
# only required when using mupdf
|
|
|
|
, freetype
|
|
|
|
, gumbo
|
|
|
|
, jbig2dec
|
|
|
|
, mupdf
|
|
|
|
, openjpeg
|
|
|
|
# choose renderer: mupdf or poppler or both (not recommended)
|
|
|
|
, usePoppler ? false
|
|
|
|
, useMupdf ? true
|
2022-09-05 23:28:49 +00:00
|
|
|
, useExternalRenderer ? false
|
2022-06-30 01:26:04 +00:00
|
|
|
}:
|
2021-05-10 06:27:30 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-07-06 17:21:56 +00:00
|
|
|
pname = "beamerpresenter";
|
2022-10-03 09:12:43 +00:00
|
|
|
version = "0.2.3-1";
|
2020-07-06 17:21:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stiglers-eponym";
|
|
|
|
repo = "BeamerPresenter";
|
2022-10-03 09:12:43 +00:00
|
|
|
rev = "dd41a00b3c6c8b881fa62945165c965634df66f0";
|
|
|
|
sha256 = "11yj1zl8hdnqbynkbyzg8kwyx1jl8c87x8f8qyllpk0s6cg304d0";
|
2020-07-06 17:21:56 +00:00
|
|
|
};
|
|
|
|
|
2022-06-30 01:26:04 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
wrapGAppsHook
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gst_all_1.gst-libav
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gst-plugins-good
|
|
|
|
zlib
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
qttools
|
2023-03-16 19:29:14 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2022-06-30 01:26:04 +00:00
|
|
|
qtwayland
|
|
|
|
] ++ lib.optionals useMupdf [
|
|
|
|
freetype
|
|
|
|
gumbo
|
|
|
|
jbig2dec
|
|
|
|
mupdf
|
|
|
|
openjpeg
|
|
|
|
] ++ lib.optionals usePoppler [
|
|
|
|
poppler
|
|
|
|
];
|
2020-07-06 17:21:56 +00:00
|
|
|
|
2022-04-02 14:49:00 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DGIT_VERSION=OFF"
|
2022-06-30 01:26:04 +00:00
|
|
|
"-DUSE_POPPLER=${if usePoppler then "ON" else "OFF"}"
|
|
|
|
"-DUSE_MUPDF=${if useMupdf then "ON" else "OFF"}"
|
2022-09-05 23:28:49 +00:00
|
|
|
"-DUSE_QTPDF=OFF"
|
|
|
|
"-DUSE_MUPDF_THIRD=ON"
|
|
|
|
"-DUSE_EXTERNAL_RENDERER=${if useExternalRenderer then "ON" else "OFF"}"
|
2022-04-02 14:49:00 +00:00
|
|
|
"-DUSE_MUJS=OFF"
|
|
|
|
"-DUSE_GUMBO=ON"
|
|
|
|
"-DUSE_TRANSLATIONS=ON"
|
2022-06-30 01:26:04 +00:00
|
|
|
"-DQT_VERSION_MAJOR=${lib.versions.major qtbase.version}"
|
2022-04-02 14:49:00 +00:00
|
|
|
];
|
2020-07-06 17:21:56 +00:00
|
|
|
|
2022-06-30 01:26:04 +00:00
|
|
|
preFixup = ''
|
|
|
|
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-04-02 14:49:00 +00:00
|
|
|
description = "Modular multi screen pdf presentation viewer";
|
2020-07-06 17:21:56 +00:00
|
|
|
homepage = "https://github.com/stiglers-eponym/BeamerPresenter";
|
2022-04-03 08:32:50 +00:00
|
|
|
license = with licenses; [ agpl3 gpl3Plus ];
|
2020-07-06 17:21:56 +00:00
|
|
|
platforms = platforms.all;
|
2022-06-30 01:26:04 +00:00
|
|
|
maintainers = with maintainers; [ pacien dotlambda ];
|
2020-07-06 17:21:56 +00:00
|
|
|
};
|
|
|
|
}
|