2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, installShellFiles
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gumbo
|
|
|
|
, harfbuzz
|
|
|
|
, jbig2dec
|
2022-08-12 12:06:08 +00:00
|
|
|
, mujs
|
2022-04-15 01:41:22 +00:00
|
|
|
, mupdf
|
|
|
|
, openjpeg
|
|
|
|
, qt3d
|
|
|
|
, qtbase
|
|
|
|
, qmake
|
|
|
|
, wrapQtAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sioyek";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.4.0";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ahrm";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-F71JXgYaWAye+nlSrZvGjJ4ucvHTx3tPZHRC5QI4QiU=";
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = [ gumbo harfbuzz jbig2dec mupdf mujs openjpeg qt3d qtbase ];
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles wrapQtAppsHook qmake ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pdf_viewer/main.cpp \
|
|
|
|
--replace "/usr/share/sioyek" "$out/share" \
|
|
|
|
--replace "/etc/sioyek" "$out/etc"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 tutorial.pdf $out/share/tutorial.pdf
|
|
|
|
cp -r pdf_viewer/shaders $out/share/
|
|
|
|
install -Dm644 -t $out/etc/ pdf_viewer/{keys,prefs}.config
|
|
|
|
installManPage resources/sioyek.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Sioyek is a PDF viewer designed for reading research papers and technical books.";
|
|
|
|
homepage = "https://sioyek.info/";
|
|
|
|
changelog = "https://github.com/ahrm/sioyek/releases";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.podocarp ];
|
|
|
|
};
|
|
|
|
}
|