2016-05-06 12:56:56 +03:00
|
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
|
, freetype, harfbuzz, imlib2, jbig2dec, libjpeg, libX11, mujs, mupdf
|
|
|
|
|
, ncurses, openjpeg, openssl }:
|
2015-01-15 01:31:47 +03:00
|
|
|
|
|
2015-04-21 21:00:01 +03:00
|
|
|
|
let
|
|
|
|
|
binaries = [ "jfbpdf" "jfbview" "jpdfcat" "jpdfgrep" ];
|
|
|
|
|
in
|
2016-01-25 22:08:34 +03:00
|
|
|
|
stdenv.mkDerivation rec {
|
2015-01-15 01:31:47 +03:00
|
|
|
|
name = "jfbview-${version}";
|
2016-05-06 12:56:56 +03:00
|
|
|
|
version = "0.5.2";
|
2015-01-15 01:31:47 +03:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2016-05-06 12:56:56 +03:00
|
|
|
|
sha256 = "1vd2ndl4ar2bzqf0k11qid6gvma59qg62imsa81mgczsqw7kvbx6";
|
2015-04-21 21:00:01 +03:00
|
|
|
|
rev = version;
|
2015-01-15 01:31:47 +03:00
|
|
|
|
repo = "JFBView";
|
|
|
|
|
owner = "jichu4n";
|
|
|
|
|
};
|
|
|
|
|
|
2016-05-06 12:56:56 +03:00
|
|
|
|
buildInputs = [ freetype harfbuzz imlib2 jbig2dec libjpeg libX11 mujs mupdf
|
2015-04-21 21:00:01 +03:00
|
|
|
|
ncurses openjpeg openssl ];
|
2015-01-15 01:31:47 +03:00
|
|
|
|
|
2016-05-06 12:56:56 +03:00
|
|
|
|
configurePhase = ''
|
|
|
|
|
# Hack. Probing (with `ldconfig -p`) fails with ‘cannot execute binary file’.
|
|
|
|
|
# Overriding `OPENJP2 = ...` later works, but makes build output misleading:
|
|
|
|
|
substituteInPlace Makefile --replace "ldconfig -p" "echo libopenjp2"
|
|
|
|
|
|
|
|
|
|
make config.mk
|
|
|
|
|
'';
|
|
|
|
|
|
2015-04-21 21:00:01 +03:00
|
|
|
|
buildFlags = binaries;
|
2015-01-15 01:31:47 +03:00
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin
|
2015-04-21 21:00:01 +03:00
|
|
|
|
install ${toString binaries} $out/bin
|
2015-01-15 01:31:47 +03:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
|
description = "PDF and image viewer for the Linux framebuffer";
|
|
|
|
|
longDescription = ''
|
2015-04-21 21:00:01 +03:00
|
|
|
|
A very fast PDF and image viewer for the Linux framebuffer with some
|
|
|
|
|
advanced and unique features, including:
|
|
|
|
|
- Reads PDFs (MuPDF) and common image formats (Imlib2)
|
|
|
|
|
- Supports arbitrary zoom (10% - 1000%) and rotation
|
|
|
|
|
- Table of Contents (TOC) viewer for PDF documents
|
|
|
|
|
- Multi-threaded rendering on multi-core machines
|
|
|
|
|
- Asynchronous background rendering of the next page
|
|
|
|
|
- Customizable multi-threaded caching
|
2015-01-15 01:31:47 +03:00
|
|
|
|
'';
|
|
|
|
|
homepage = http://seasonofcode.com/pages/jfbview.html;
|
2015-05-28 20:20:29 +03:00
|
|
|
|
license = licenses.asl20;
|
2015-11-17 23:29:29 +03:00
|
|
|
|
platforms = platforms.linux;
|
2015-01-15 01:31:47 +03:00
|
|
|
|
maintainers = with maintainers; [ nckx ];
|
|
|
|
|
};
|
|
|
|
|
}
|