1{ stdenv, fetchFromGitHub, freetype, imlib2, jbig2dec, libjpeg, libX11
2, mujs, mupdf, ncurses, openjpeg, openssl }:
3
4let
5 version = "0.5.1";
6 binaries = [ "jfbpdf" "jfbview" "jpdfcat" "jpdfgrep" ];
7in
8stdenv.mkDerivation {
9 name = "jfbview-${version}";
10
11 src = fetchFromGitHub {
12 sha256 = "113bkf49q04k9rjps5l28ychmzsfjajp9cjhr433s9ld0972z01m";
13 rev = version;
14 repo = "JFBView";
15 owner = "jichu4n";
16 };
17
18 buildInputs = [ freetype imlib2 jbig2dec libjpeg libX11 mujs mupdf
19 ncurses openjpeg openssl ];
20
21 buildFlags = binaries;
22 enableParallelBuilding = true;
23
24 installPhase = ''
25 mkdir -p $out/bin
26 install ${toString binaries} $out/bin
27 '';
28
29 meta = with stdenv.lib; {
30 inherit version;
31 description = "PDF and image viewer for the Linux framebuffer";
32 longDescription = ''
33 A very fast PDF and image viewer for the Linux framebuffer with some
34 advanced and unique features, including:
35 - Reads PDFs (MuPDF) and common image formats (Imlib2)
36 - Supports arbitrary zoom (10% - 1000%) and rotation
37 - Table of Contents (TOC) viewer for PDF documents
38 - Multi-threaded rendering on multi-core machines
39 - Asynchronous background rendering of the next page
40 - Customizable multi-threaded caching
41 '';
42 homepage = http://seasonofcode.com/pages/jfbview.html;
43 license = licenses.asl20;
44 platforms = with platforms; linux;
45 maintainers = with maintainers; [ nckx ];
46 };
47}