mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 05:31:22 +00:00
zathura: mupdf plugin
This commit is contained in:
parent
cadbca8a6f
commit
d15c34f677
|
@ -1,4 +1,4 @@
|
|||
{ callPackage, pkgs, fetchurl }:
|
||||
{ callPackage, pkgs, fetchurl, useMupdf }:
|
||||
|
||||
rec {
|
||||
inherit (pkgs) stdenv;
|
||||
|
@ -12,6 +12,10 @@ rec {
|
|||
|
||||
zathura_pdf_poppler = callPackage ./pdf-poppler { };
|
||||
|
||||
zathura_pdf_mupdf = callPackage ./pdf-mupdf {
|
||||
gtk = pkgs.gtk3;
|
||||
};
|
||||
|
||||
zathura_djvu = callPackage ./djvu {
|
||||
gtk = pkgs.gtk3;
|
||||
};
|
||||
|
@ -27,9 +31,9 @@ rec {
|
|||
name = "zathura-${zathura_core.version}";
|
||||
|
||||
plugins_path = stdenv.lib.makeSearchPath "lib" [
|
||||
zathura_pdf_poppler
|
||||
zathura_djvu
|
||||
zathura_ps
|
||||
(if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler)
|
||||
];
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
|
17
pkgs/applications/misc/zathura/pdf-mupdf/config.patch
Normal file
17
pkgs/applications/misc/zathura/pdf-mupdf/config.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- zathura-pdf-mupdf-0.2.6/config.mk
|
||||
+++ zathura-pdf-mupdf-0.2.6/config.mk
|
||||
@@ -32,10 +32,11 @@
|
||||
OPENSSL_INC ?= $(shell pkg-config --cflags libcrypto)
|
||||
OPENSSL_LIB ?= $(shell pkg-config --libs libcrypto)
|
||||
|
||||
-MUPDF_LIB ?= -lmupdf -lmupdf-js-none
|
||||
+MUPDF_INC ?= $(shell pkg-config --cflags mupdf)
|
||||
+MUPDF_LIB ?= $(shell pkg-config --libs mupdf)
|
||||
|
||||
-INCS = ${GTK_INC} ${GIRARA_INC} ${OPENSSL_INC} ${ZATHURA_INC}
|
||||
-LIBS = ${GTK_LIB} ${GIRARA_LIB} ${MUPDF_LIB} ${OPENSSL_LIB} -ljbig2dec -lopenjp2 -ljpeg
|
||||
+INCS = ${GTK_INC} ${GIRARA_INC} ${OPENSSL_INC} ${ZATHURA_INC} ${MUPDF_INC}
|
||||
+LIBS = ${GTK_LIB} ${GIRARA_LIB} ${OPENSSL_LIB} ${MUPDF_LIB} -ljbig2dec -ljpeg
|
||||
|
||||
# flags
|
||||
CFLAGS += -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS)
|
29
pkgs/applications/misc/zathura/pdf-mupdf/default.nix
Normal file
29
pkgs/applications/misc/zathura/pdf-mupdf/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ stdenv, fetchurl, pkgconfig, zathura_core, gtk, girara, mupdf, openssl, openjpeg, libjpeg, jbig2dec }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.2.6";
|
||||
name = "zathura-pdf-mupdf-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
|
||||
sha256 = "5df94b6f906008b5f3bca770a552da6d2917d6b8d3e4b3049cb7001302041b20";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig zathura_core gtk girara openssl mupdf openjpeg libjpeg jbig2dec ];
|
||||
|
||||
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
|
||||
|
||||
preConfigure = "patch -p1 < ${./config.patch}";
|
||||
|
||||
meta = {
|
||||
homepage = http://pwmt.org/projects/zathura/;
|
||||
description = "A zathura PDF plugin (mupdf)";
|
||||
longDescription = ''
|
||||
The zathura-pdf-mupdf plugin adds PDF support to zathura by
|
||||
using the mupdf rendering library.
|
||||
'';
|
||||
license = stdenv.lib.licenses.zlib;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
# maintainers = [ ];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, pkgconfig, zathura_core, girara, poppler, gettext }:
|
||||
{ stdenv, fetchurl, pkgconfig, zathura_core, girara, poppler }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.2.5";
|
||||
|
@ -9,16 +9,16 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1b0chsds8iwjm4g629p6a67nb6wgra65pw2vvngd7g35dmcjgcv0";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig poppler gettext zathura_core girara ];
|
||||
buildInputs = [ pkgconfig poppler zathura_core girara ];
|
||||
|
||||
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
|
||||
|
||||
meta = {
|
||||
homepage = http://pwmt.org/projects/zathura/;
|
||||
description = "A zathura PDF plugin";
|
||||
description = "A zathura PDF plugin (poppler)";
|
||||
longDescription = ''
|
||||
The zathura-pdf-poppler plugin adds PDF support to zathura by
|
||||
using the poppler rendering engine.
|
||||
using the poppler rendering library.
|
||||
'';
|
||||
license = stdenv.lib.licenses.zlib;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
|
|
|
@ -9739,7 +9739,10 @@ let
|
|||
|
||||
zathuraCollection = recurseIntoAttrs
|
||||
(let callPackage = newScope pkgs.zathuraCollection; in
|
||||
import ../applications/misc/zathura { inherit callPackage pkgs fetchurl; });
|
||||
import ../applications/misc/zathura {
|
||||
inherit callPackage pkgs fetchurl;
|
||||
useMupdf = config.zathura.useMupdf or false;
|
||||
});
|
||||
|
||||
zathura = zathuraCollection.zathuraWrapper;
|
||||
|
||||
|
|
Loading…
Reference in a new issue