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