Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
99 lines
1.8 KiB
Nix
99 lines
1.8 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
makeWrapper,
|
|
fetchFromGitHub,
|
|
ocaml,
|
|
pkg-config,
|
|
mupdf,
|
|
libX11,
|
|
jbig2dec,
|
|
openjpeg,
|
|
libjpeg,
|
|
lcms2,
|
|
harfbuzz,
|
|
libGLU,
|
|
libGL,
|
|
gumbo,
|
|
freetype,
|
|
zlib,
|
|
xclip,
|
|
inotify-tools,
|
|
procps,
|
|
}:
|
|
|
|
assert lib.versionAtLeast (lib.getVersion ocaml) "4.07";
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "llpp";
|
|
version = "42";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "criticic";
|
|
repo = "llpp";
|
|
rev = "v${version}";
|
|
hash = "sha256-B/jKvBtBwMOErUVmGFGXXIT8FzMl1DFidfDCHIH41TU=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i "2d;s/ver=.*/ver=${version}/" build.bash
|
|
'';
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
ocaml
|
|
pkg-config
|
|
];
|
|
buildInputs = [
|
|
mupdf
|
|
libX11
|
|
freetype
|
|
zlib
|
|
gumbo
|
|
jbig2dec
|
|
openjpeg
|
|
libjpeg
|
|
lcms2
|
|
harfbuzz
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
libGLU
|
|
libGL
|
|
];
|
|
|
|
dontStrip = true;
|
|
|
|
buildPhase = ''
|
|
bash ./build.bash build
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -d $out/bin
|
|
install build/llpp $out/bin
|
|
install misc/llpp.inotify $out/bin/llpp.inotify
|
|
install -Dm444 misc/llpp.desktop -t $out/share/applications
|
|
''
|
|
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
wrapProgram $out/bin/llpp \
|
|
--prefix PATH ":" "${xclip}/bin"
|
|
|
|
wrapProgram $out/bin/llpp.inotify \
|
|
--prefix PATH ":" "$out/bin" \
|
|
--prefix PATH ":" "${inotify-tools}/bin" \
|
|
--prefix PATH ":" "${procps}/bin"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/criticic/llpp";
|
|
description = "MuPDF based PDF pager written in OCaml";
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
maintainers = with maintainers; [ pSub ];
|
|
license = [
|
|
licenses.publicDomain
|
|
licenses.bsd3
|
|
];
|
|
};
|
|
}
|