mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 16:45:51 +03:00
beamerpresenter: 0.2.1 -> 0.2.2
The build system of beamerpresenter has switched from qmake to cmake in version 0.2.2. The new .nix file has been tested in a VM running NixOS 21.11.336755.efea022d6fe.
This commit is contained in:
parent
77edb0a28a
commit
a47954bdf7
@ -1,44 +1,67 @@
|
||||
{ lib, stdenv, fetchFromGitHub, installShellFiles,
|
||||
qmake, qtbase, qtmultimedia, wrapQtAppsHook,
|
||||
poppler, mupdf, freetype, jbig2dec, openjpeg, gumbo,
|
||||
renderer ? "mupdf" }:
|
||||
{ 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
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "beamerpresenter";
|
||||
version = "0.2.1";
|
||||
version = "0.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stiglers-eponym";
|
||||
repo = "BeamerPresenter";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-+ZxllYL2wco4bG2pqInIbL9qfOoqoUJJUReqDyEBRcI=";
|
||||
sha256 = "16v263nnnipih3lxg95rmwz0ihnvpl4n1wlj9r6zavnspzlp9dvb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake installShellFiles wrapQtAppsHook ];
|
||||
buildInputs = [ qtbase qtmultimedia ] ++ renderers.${renderer}.buildInputs;
|
||||
nativeBuildInputs = [ pkg-config installShellFiles wrapQtAppsHook ];
|
||||
buildInputs = [ gcc cmake coreutils gnumake bash zlib qtbase qtmultimedia qttools ] ++ 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
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE='Release'"
|
||||
"-DGIT_VERSION=OFF"
|
||||
"-DUSE_POPPLER=${use_poppler}"
|
||||
"-DUSE_MUPDF=${use_mupdf}"
|
||||
"-DUSE_MUJS=OFF"
|
||||
"-DUSE_GUMBO=ON"
|
||||
"-DUSE_TRANSLATIONS=ON"
|
||||
"-DQT_VERSION_MAJOR=${qt_version}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modular multi screen pdf presentation software respecting your window manager";
|
||||
description = "Modular multi screen pdf presentation viewer";
|
||||
homepage = "https://github.com/stiglers-eponym/BeamerPresenter";
|
||||
license = licenses.agpl3Plus;
|
||||
platforms = platforms.all;
|
||||
|
Loading…
Reference in New Issue
Block a user