beamerpresenter: use qt6

Embedded videos are now supported.
This commit is contained in:
Robert Schütz 2022-06-30 01:26:04 +00:00 committed by Robert Schütz
parent 27939f0d7c
commit 95e054f03c
2 changed files with 61 additions and 44 deletions

View File

@ -1,39 +1,28 @@
{ lib,
stdenv,
fetchFromGitHub,
installShellFiles,
pkg-config,
cmake,
qtbase,
qtmultimedia,
qttools,
wrapQtAppsHook,
bash,
zlib,
gcc,
gnumake,
coreutils,
# only required when using poppler
poppler,
# only required when using mupdf
mupdf,
freetype,
jbig2dec,
openjpeg,
gumbo,
# choose renderer: mupdf or poppler or both (not recommended)
renderer ? "mupdf",
# choose major Qt version: "5" or "6" (only 5 is tested)
qt_version ? "5"}:
let
renderers = {
mupdf.buildInputs = [ mupdf freetype jbig2dec openjpeg gumbo ];
poppler.buildInputs = [ poppler ];
};
use_poppler = if "${renderer}" == "poppler" || "${renderer}" == "both" then "ON" else "OFF";
use_mupdf = if "${renderer}" == "mupdf" || "${renderer}" == "both" then "ON" else "OFF";
in
{ 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
}:
stdenv.mkDerivation rec {
pname = "beamerpresenter";
@ -46,25 +35,53 @@ stdenv.mkDerivation rec {
sha256 = "16v263nnnipih3lxg95rmwz0ihnvpl4n1wlj9r6zavnspzlp9dvb";
};
nativeBuildInputs = [ pkg-config installShellFiles wrapQtAppsHook ];
buildInputs = [ gcc cmake coreutils gnumake bash zlib qtbase qtmultimedia qttools ] ++ renderers.${renderer}.buildInputs;
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
qtwayland
] ++ lib.optionals useMupdf [
freetype
gumbo
jbig2dec
mupdf
openjpeg
] ++ lib.optionals usePoppler [
poppler
];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE='Release'"
"-DGIT_VERSION=OFF"
"-DUSE_POPPLER=${use_poppler}"
"-DUSE_MUPDF=${use_mupdf}"
"-DUSE_POPPLER=${if usePoppler then "ON" else "OFF"}"
"-DUSE_MUPDF=${if useMupdf then "ON" else "OFF"}"
"-DUSE_MUJS=OFF"
"-DUSE_GUMBO=ON"
"-DUSE_TRANSLATIONS=ON"
"-DQT_VERSION_MAJOR=${qt_version}"
"-DQT_VERSION_MAJOR=${lib.versions.major qtbase.version}"
];
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
description = "Modular multi screen pdf presentation viewer";
homepage = "https://github.com/stiglers-eponym/BeamerPresenter";
license = with licenses; [ agpl3 gpl3Plus ];
platforms = platforms.all;
maintainers = with maintainers; [ pacien ];
maintainers = with maintainers; [ pacien dotlambda ];
};
}

View File

@ -4720,7 +4720,7 @@ with pkgs;
bdsync = callPackage ../tools/backup/bdsync { };
beamerpresenter = libsForQt5.callPackage ../applications/office/beamerpresenter { };
beamerpresenter = qt6Packages.callPackage ../applications/office/beamerpresenter { };
beanstalkd = callPackage ../servers/beanstalkd { };