depot/third_party/nixpkgs/pkgs/applications/office/beamerpresenter/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

47 lines
1.3 KiB
Nix

{ lib, stdenv, fetchFromGitHub, installShellFiles,
qmake, qtbase, qtmultimedia, wrapQtAppsHook,
poppler, mupdf, freetype, jbig2dec, openjpeg, gumbo,
renderer ? "mupdf" }:
let
renderers = {
mupdf.buildInputs = [ mupdf freetype jbig2dec openjpeg gumbo ];
poppler.buildInputs = [ poppler ];
};
in
stdenv.mkDerivation rec {
pname = "beamerpresenter";
version = "0.2.1";
src = fetchFromGitHub {
owner = "stiglers-eponym";
repo = "BeamerPresenter";
rev = "v${version}";
sha256 = "sha256-+ZxllYL2wco4bG2pqInIbL9qfOoqoUJJUReqDyEBRcI=";
};
nativeBuildInputs = [ qmake installShellFiles wrapQtAppsHook ];
buildInputs = [ qtbase qtmultimedia ] ++ renderers.${renderer}.buildInputs;
qmakeFlags = [ "RENDERER=${renderer}" ];
postPatch = ''
shopt -s globstar
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"
done
'';
meta = with lib; {
description = "Modular multi screen pdf presentation software respecting your window manager";
homepage = "https://github.com/stiglers-eponym/BeamerPresenter";
license = licenses.agpl3Plus;
platforms = platforms.all;
maintainers = with maintainers; [ pacien ];
};
}