2020-10-14 07:16:08 +02:00
|
|
|
{ stdenv, lib, substituteAll, makeWrapper, fetchgit, ocaml, mupdf, libX11, jbig2dec, openjpeg, libjpeg , lcms2, harfbuzz,
|
|
|
|
libGLU, libGL, gumbo, freetype, zlib, xclip, inotify-tools, procps }:
|
2014-05-26 20:31:53 +02:00
|
|
|
|
2018-12-01 13:14:24 +01:00
|
|
|
assert lib.versionAtLeast (lib.getVersion ocaml) "4.07";
|
2016-09-19 19:00:42 +02:00
|
|
|
|
2018-07-20 19:56:59 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "llpp";
|
2020-10-14 07:16:08 +02:00
|
|
|
version = "33";
|
2014-05-26 20:31:53 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://repo.or.cz/llpp.git";
|
2018-12-01 13:14:24 +01:00
|
|
|
rev = "v${version}";
|
2020-10-14 07:16:08 +02:00
|
|
|
sha256 = "0shqzhaflm2yhkx6c0csq9lxp1s1r7lh5kgpx9q5k06xya2a7yvs";
|
2015-08-04 12:59:34 +02:00
|
|
|
fetchSubmodules = false;
|
2014-05-26 20:31:53 +02:00
|
|
|
};
|
|
|
|
|
2018-12-01 13:14:24 +01:00
|
|
|
patches = (substituteAll {
|
|
|
|
inherit version;
|
|
|
|
src = ./fix-build-bash.patch;
|
|
|
|
});
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-10-14 07:16:08 +02:00
|
|
|
buildInputs = [ ocaml mupdf libX11 libGLU libGL freetype zlib gumbo jbig2dec openjpeg libjpeg lcms2 harfbuzz ];
|
2016-06-12 08:39:59 +02:00
|
|
|
|
|
|
|
dontStrip = true;
|
2014-05-26 20:31:53 +02:00
|
|
|
|
2014-11-29 14:17:19 +01:00
|
|
|
configurePhase = ''
|
2018-12-01 13:14:24 +01:00
|
|
|
mkdir -p build/mupdf/thirdparty
|
|
|
|
ln -s ${freetype.dev} build/mupdf/thirdparty/freetype
|
2014-05-26 20:31:53 +02:00
|
|
|
'';
|
|
|
|
|
2016-06-12 08:39:59 +02:00
|
|
|
buildPhase = ''
|
2018-12-01 13:14:24 +01:00
|
|
|
bash ./build.bash build
|
2016-06-12 08:39:59 +02:00
|
|
|
'';
|
2014-05-26 20:31:53 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2019-02-26 19:37:41 +01:00
|
|
|
install -d $out/bin
|
2014-11-29 14:17:19 +01:00
|
|
|
install build/llpp $out/bin
|
2019-02-26 19:38:01 +01:00
|
|
|
install misc/llpp.inotify $out/bin/llpp.inotify
|
|
|
|
|
2014-11-29 14:17:19 +01:00
|
|
|
wrapProgram $out/bin/llpp \
|
2018-12-01 13:14:24 +01:00
|
|
|
--prefix PATH ":" "${xclip}/bin"
|
2019-02-26 19:38:01 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/llpp.inotify \
|
|
|
|
--prefix PATH ":" "$out/bin" \
|
|
|
|
--prefix PATH ":" "${inotify-tools}/bin" \
|
|
|
|
--prefix PATH ":" "${procps}/bin"
|
2014-05-26 20:31:53 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://repo.or.cz/w/llpp.git";
|
2014-05-26 20:31:53 +02:00
|
|
|
description = "A MuPDF based PDF pager written in OCaml";
|
2014-11-29 14:17:19 +01:00
|
|
|
platforms = platforms.linux;
|
2021-01-06 07:06:03 +01:00
|
|
|
maintainers = with maintainers; [ pSub ];
|
2014-11-29 14:17:19 +01:00
|
|
|
license = licenses.gpl3;
|
2014-05-26 20:31:53 +02:00
|
|
|
};
|
|
|
|
}
|