nixpkgs/pkgs/applications/office/beamerpresenter/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

96 lines
1.9 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, wrapGAppsHook3
, wrapQtAppsHook
, gst_all_1
, qtbase
, qtsvg
, 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
, useExternalRenderer ? false
}:
2021-05-10 06:27:30 +00:00
stdenv.mkDerivation rec {
2020-07-06 17:21:56 +00:00
pname = "beamerpresenter";
version = "0.2.4";
2020-07-06 17:21:56 +00:00
src = fetchFromGitHub {
owner = "stiglers-eponym";
repo = "BeamerPresenter";
rev = "v${version}";
hash = "sha256-UQbyzkFjrIDPcrE6yGuOWsXNjz8jWyJEWiQwHmf91/8=";
2020-07-06 17:21:56 +00:00
};
nativeBuildInputs = [
cmake
pkg-config
wrapGAppsHook3
wrapQtAppsHook
];
dontWrapGApps = true;
buildInputs = [
gst_all_1.gst-libav
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
zlib
qtbase
qtsvg
qtmultimedia
qttools
2023-03-16 19:29:14 +00:00
] ++ lib.optionals stdenv.isLinux [
qtwayland
] ++ lib.optionals useMupdf [
freetype
gumbo
jbig2dec
mupdf
openjpeg
] ++ lib.optionals usePoppler [
poppler
];
2020-07-06 17:21:56 +00:00
cmakeFlags = [
"-DGIT_VERSION=OFF"
"-DUSE_POPPLER=${if usePoppler then "ON" else "OFF"}"
"-DUSE_MUPDF=${if useMupdf then "ON" else "OFF"}"
"-DUSE_QTPDF=OFF"
"-DLINK_MUPDF_THIRD=OFF"
"-DUSE_EXTERNAL_RENDERER=${if useExternalRenderer then "ON" else "OFF"}"
"-DLINK_MUJS=OFF"
"-DLINK_GUMBO=ON"
"-DUSE_TRANSLATIONS=ON"
"-DQT_VERSION_MAJOR=${lib.versions.major qtbase.version}"
];
2020-07-06 17:21:56 +00:00
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
description = "Modular multi screen pdf presentation viewer";
2020-07-06 17:21:56 +00:00
homepage = "https://github.com/stiglers-eponym/BeamerPresenter";
2024-03-19 12:26:06 +00:00
license = with licenses; [ agpl3Only gpl3Plus ];
2020-07-06 17:21:56 +00:00
platforms = platforms.all;
maintainers = with maintainers; [ pacien dotlambda ];
2023-12-11 20:45:13 +00:00
mainProgram = "beamerpresenter";
2020-07-06 17:21:56 +00:00
};
}