2021-05-10 08:27:30 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, installShellFiles,
|
|
|
|
qmake, qtbase, qtmultimedia, wrapQtAppsHook,
|
|
|
|
poppler, mupdf, freetype, jbig2dec, openjpeg, gumbo,
|
2021-05-09 23:51:26 +02:00
|
|
|
renderer ? "mupdf" }:
|
2020-07-06 19:21:56 +02:00
|
|
|
|
2021-05-09 23:51:26 +02:00
|
|
|
let
|
|
|
|
renderers = {
|
2021-05-10 08:27:30 +02:00
|
|
|
mupdf.buildInputs = [ mupdf freetype jbig2dec openjpeg gumbo ];
|
2021-05-09 23:51:26 +02:00
|
|
|
poppler.buildInputs = [ poppler ];
|
|
|
|
};
|
|
|
|
|
2021-05-10 08:27:30 +02:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-07-06 19:21:56 +02:00
|
|
|
pname = "beamerpresenter";
|
2021-12-01 14:34:58 +01:00
|
|
|
version = "0.2.1";
|
2020-07-06 19:21:56 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stiglers-eponym";
|
|
|
|
repo = "BeamerPresenter";
|
|
|
|
rev = "v${version}";
|
2021-12-01 14:34:58 +01:00
|
|
|
sha256 = "sha256-+ZxllYL2wco4bG2pqInIbL9qfOoqoUJJUReqDyEBRcI=";
|
2020-07-06 19:21:56 +02:00
|
|
|
};
|
|
|
|
|
2021-05-10 08:27:30 +02:00
|
|
|
nativeBuildInputs = [ qmake installShellFiles wrapQtAppsHook ];
|
2021-05-09 23:51:26 +02:00
|
|
|
buildInputs = [ qtbase qtmultimedia ] ++ renderers.${renderer}.buildInputs;
|
|
|
|
|
|
|
|
qmakeFlags = [ "RENDERER=${renderer}" ];
|
2020-07-06 19:21:56 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
shopt -s globstar
|
2021-05-09 23:51:26 +02:00
|
|
|
for f in **/*.{pro,conf,h,cpp}; do
|
|
|
|
substituteInPlace "$f" \
|
|
|
|
--replace "/usr/" "$out/" \
|
|
|
|
--replace "/etc/" "$out/etc/" \
|
|
|
|
--replace '$${GUI_CONFIG_PATH}' "$out/etc/xdg/beamerpresenter/gui.json"
|
2020-07-06 19:21:56 +02:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2021-05-09 23:51:26 +02:00
|
|
|
description = "Modular multi screen pdf presentation software respecting your window manager";
|
2020-07-06 19:21:56 +02:00
|
|
|
homepage = "https://github.com/stiglers-eponym/BeamerPresenter";
|
2021-05-09 23:51:26 +02:00
|
|
|
license = licenses.agpl3Plus;
|
2020-07-06 19:21:56 +02:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ pacien ];
|
|
|
|
};
|
|
|
|
}
|