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

58 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, lib, substituteAll, makeWrapper, fetchgit, ocaml, mupdf, libX11,
2019-11-10 16:44:34 +00:00
libGLU, libGL, freetype, xclip, inotify-tools, procps }:
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 {
pname = "llpp";
2019-09-12 09:13:36 +01:00
version = "31";
src = fetchgit {
url = "git://repo.or.cz/llpp.git";
rev = "v${version}";
2019-09-12 09:13:36 +01:00
sha256 = "14ibsm1zzxfidjajcj30b5m9in10q3817izahsjvkmryrvvn6qsg";
fetchSubmodules = false;
};
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 ];
dontStrip = true;
configurePhase = ''
mkdir -p build/mupdf/thirdparty
ln -s ${freetype.dev} build/mupdf/thirdparty/freetype
'';
buildPhase = ''
bash ./build.bash build
'';
installPhase = ''
2019-02-26 18:37:41 +00:00
install -d $out/bin
install build/llpp $out/bin
2019-02-26 18:38:01 +00:00
install misc/llpp.inotify $out/bin/llpp.inotify
wrapProgram $out/bin/llpp \
--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"
'';
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;
};
}