nixpkgs/pkgs/applications/misc/llpp/default.nix

52 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, substituteAll, makeWrapper, fetchgit, ocaml, mupdf, libX11,
libGLU_combined, freetype, xclip }:
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 {
2015-01-14 12:42:44 +00:00
name = "llpp-${version}";
version = "30";
src = fetchgit {
url = "git://repo.or.cz/llpp.git";
rev = "v${version}";
sha256 = "0iilpzf12hs0zky58j55l4y5dvzv7fc53nsrg324n9vka92mppvd";
fetchSubmodules = false;
};
patches = (substituteAll {
inherit version;
src = ./fix-build-bash.patch;
});
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ ocaml mupdf libX11 libGLU_combined freetype ];
dontStrip = true;
configurePhase = ''
mkdir -p build/mupdf/thirdparty
ln -s ${freetype.dev} build/mupdf/thirdparty/freetype
'';
buildPhase = ''
bash ./build.bash build
'';
installPhase = ''
install -d $out/bin $out/lib
install build/llpp $out/bin
wrapProgram $out/bin/llpp \
--prefix CAML_LD_LIBRARY_PATH ":" "$out/lib" \
--prefix PATH ":" "${xclip}/bin"
'';
meta = with stdenv.lib; {
2018-11-24 18:21:12 +00:00
homepage = https://repo.or.cz/w/llpp.git;
description = "A MuPDF based PDF pager written in OCaml";
platforms = platforms.linux;
maintainers = with maintainers; [ pSub enzime ];
license = licenses.gpl3;
};
}