depot/third_party/nixpkgs/pkgs/applications/office/beamerpresenter/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

51 lines
1.5 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.0";
src = fetchFromGitHub {
owner = "stiglers-eponym";
repo = "BeamerPresenter";
rev = "v${version}";
sha256 = "10i5nc5b5syaqvsixam4lmfiz3b5cphbjfgfqavi5jilq769792a";
};
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
'';
postInstall = lib.optionalString stdenv.isDarwin ''
wrapQtApp "$out"/bin/beamerpresenter.app/Contents/MacOS/beamerpresenter
'';
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 ];
};
}