diff options
author | pacien <pacien.trangirard@pacien.net> | 2021-05-09 23:51:26 +0200 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2021-05-10 02:56:24 -0400 |
commit | 76833b12065cb7f48b40b6c4320974b517cb66c2 (patch) | |
tree | 8965e531a94b4ccc83aad108155b75a5d5d68109 | |
parent | 44d6925c3fba075a3abe87c81214c2640e18fcb9 (diff) |
beamerpresenter: 0.1.3 -> 0.2.0
-rw-r--r-- | pkgs/applications/office/beamerpresenter/default.nix | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/pkgs/applications/office/beamerpresenter/default.nix b/pkgs/applications/office/beamerpresenter/default.nix index 4e8bcaee019e0..e9543a0959333 100644 --- a/pkgs/applications/office/beamerpresenter/default.nix +++ b/pkgs/applications/office/beamerpresenter/default.nix @@ -1,39 +1,44 @@ { lib, mkDerivation, fetchFromGitHub, installShellFiles, - qmake, qtbase, poppler, qtmultimedia }: + qmake, qtbase, qtmultimedia, + poppler, mupdf, jbig2dec, openjpeg, gumbo, + renderer ? "mupdf" }: -mkDerivation rec { +let + renderers = { + mupdf.buildInputs = [ mupdf jbig2dec openjpeg gumbo ]; + poppler.buildInputs = [ poppler ]; + }; + +in mkDerivation rec { pname = "beamerpresenter"; - version = "0.1.3"; + version = "0.2.0"; src = fetchFromGitHub { owner = "stiglers-eponym"; repo = "BeamerPresenter"; rev = "v${version}"; - sha256 = "1nbcqrfdjcsc6czqk1v163whka4x1w883b1298aws8yi7vac4f1i"; + sha256 = "10i5nc5b5syaqvsixam4lmfiz3b5cphbjfgfqavi5jilq769792a"; }; nativeBuildInputs = [ qmake installShellFiles ]; - buildInputs = [ qtbase qtmultimedia poppler ]; + buildInputs = [ qtbase qtmultimedia ] ++ renderers.${renderer}.buildInputs; + + qmakeFlags = [ "RENDERER=${renderer}" ]; postPatch = '' - # Fix location of poppler-*.h shopt -s globstar - for f in **/*.{h,cpp}; do - substituteInPlace $f --replace '#include <poppler-' '#include <poppler/qt5/poppler-' + 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 ''; - installPhase = '' - install -m755 beamerpresenter -Dt $out/bin/ - install -m644 src/icons/beamerpresenter.svg -Dt $out/share/icons/hicolor/scalable/apps/ - install -m644 share/applications/beamerpresenter.desktop -Dt $out/share/applications/ - installManPage man/*.{1,5} - ''; - meta = with lib; { - description = "Simple dual screen pdf presentation software"; + description = "Modular multi screen pdf presentation software respecting your window manager"; homepage = "https://github.com/stiglers-eponym/BeamerPresenter"; - license = licenses.gpl3Plus; + license = licenses.agpl3Plus; platforms = platforms.all; maintainers = with maintainers; [ pacien ]; }; |