Merge pull request #182051 from foo-dogsquared/update-sioyek

sioyek: 1.2.0 -> 1.4.0
This commit is contained in:
superherointj 2022-08-02 16:32:56 -03:00 committed by GitHub
commit e93f48d2d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@
, gumbo
, harfbuzz
, jbig2dec
, mujs
, mupdf
, openjpeg
, qt3d
@ -15,29 +16,25 @@
stdenv.mkDerivation rec {
pname = "sioyek";
version = "1.2.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "ahrm";
repo = pname;
rev = "v${version}";
sha256 = "sha256-G4iZi6xTJjWZN0T3lO0jPquxJ3p8Mc0ewmjJEKcGJ34=";
sha256 = "sha256-F71JXgYaWAye+nlSrZvGjJ4ucvHTx3tPZHRC5QI4QiU=";
};
buildInputs = [ gumbo harfbuzz jbig2dec mupdf openjpeg qt3d qtbase ];
buildInputs = [ gumbo harfbuzz jbig2dec mupdf mujs openjpeg qt3d qtbase ];
nativeBuildInputs = [ installShellFiles wrapQtAppsHook qmake ];
postPatch = ''
substituteInPlace pdf_viewer_build_config.pro \
--replace "-lmupdf-threads" "-lfreetype -lgumbo -ljbig2dec -lopenjp2 -ljpeg"
substituteInPlace pdf_viewer/main.cpp \
--replace "/usr/share/sioyek" "$out/share" \
--replace "/etc/sioyek" "$out/etc"
'';
qmakeFlags = "DEFINES+=\"LINUX_STANDARD_PATHS\" pdf_viewer_build_config.pro";
postInstall = ''
install -Dm644 tutorial.pdf $out/share/tutorial.pdf
cp -r pdf_viewer/shaders $out/share/