2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-09-18 23:15:17 +00:00
|
|
|
, mkDerivation
|
|
|
|
, fetchurl
|
2023-11-14 20:05:05 +00:00
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, libtool
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-09-18 23:15:17 +00:00
|
|
|
, djvulibre
|
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, xorg
|
|
|
|
, libtiff
|
|
|
|
, darwin
|
|
|
|
}:
|
2007-11-11 16:52:29 +00:00
|
|
|
|
2019-09-18 23:15:17 +00:00
|
|
|
mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "djview";
|
2023-11-14 20:05:05 +00:00
|
|
|
version = "4.12";
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
2017-03-19 13:40:15 +00:00
|
|
|
|
2015-09-20 06:43:32 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://sourceforge/djvu/${pname}-${version}.tar.gz";
|
2023-11-14 20:05:05 +00:00
|
|
|
hash = "sha256-VnPGqLfhlbkaFyCyQJGRW4FF3jSHnbEVi8k2sQDq8+M=";
|
2015-09-20 06:43:32 +00:00
|
|
|
};
|
2007-11-11 16:52:29 +00:00
|
|
|
|
2019-09-18 23:15:17 +00:00
|
|
|
nativeBuildInputs = [
|
2023-11-14 20:05:05 +00:00
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
libtool
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-09-18 23:15:17 +00:00
|
|
|
qttools
|
|
|
|
];
|
2012-02-10 10:13:44 +00:00
|
|
|
|
2019-09-18 23:15:17 +00:00
|
|
|
buildInputs = [
|
|
|
|
djvulibre
|
|
|
|
qtbase
|
|
|
|
xorg.libXt
|
|
|
|
libtiff
|
2021-01-15 13:21:58 +00:00
|
|
|
] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.AGL;
|
2019-09-18 23:15:17 +00:00
|
|
|
|
2023-11-14 20:05:05 +00:00
|
|
|
preConfigure = ''
|
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2019-09-18 23:15:17 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-silent-rules"
|
|
|
|
"--disable-dependency-tracking"
|
|
|
|
"--with-x"
|
|
|
|
"--with-tiff"
|
2023-11-14 20:05:05 +00:00
|
|
|
"--disable-nsdejavu" # 2023-11-14: modern browsers have dropped support for NPAPI
|
2021-01-15 13:21:58 +00:00
|
|
|
] ++ lib.optional stdenv.hostPlatform.isDarwin "--enable-mac";
|
2012-02-10 10:13:44 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-05-28 13:28:44 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2019-09-18 23:15:17 +00:00
|
|
|
description = "Portable DjVu viewer (Qt5) and browser (nsdejavu) plugin";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "djview";
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://djvu.sourceforge.net/djview4.html";
|
2023-11-14 20:05:05 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2017-03-19 13:40:15 +00:00
|
|
|
platforms = platforms.unix;
|
2019-09-18 23:15:17 +00:00
|
|
|
maintainers = with maintainers; [ Anton-Latukha ];
|
|
|
|
longDescription = ''
|
|
|
|
The portable DjVu viewer (Qt5) and browser (nsdejavu) plugin.
|
|
|
|
|
|
|
|
Djview highlights:
|
|
|
|
- entirely based on the public DjVulibre api.
|
|
|
|
- entirely written in portable Qt5.
|
|
|
|
- works natively under Unix/X11, MS Windows, and macOS X.
|
|
|
|
- continuous scrolling of pages
|
|
|
|
- side-by-side display of pages
|
|
|
|
- ability to specify a url to the djview command
|
|
|
|
- all plugin and cgi options available from the command line
|
|
|
|
- all silly annotations implemented
|
|
|
|
- display thumbnails as a grid
|
|
|
|
- display outlines
|
|
|
|
- page names supported (see djvused command set-page-title)
|
|
|
|
- metadata dialog (see djvused command set-meta)
|
|
|
|
- implemented as reusable Qt widgets
|
|
|
|
|
|
|
|
nsdejavu: browser plugin for DjVu. It internally uses djview.
|
|
|
|
Has CGI-style arguments to configure the view of document (see man).
|
|
|
|
'';
|
2015-09-20 06:43:32 +00:00
|
|
|
};
|
2007-11-11 16:52:29 +00:00
|
|
|
}
|