Merge pull request #105 from ierton/zathura

Zathura
This commit is contained in:
Rob Vermaas 2012-09-02 04:10:30 -07:00
commit c9f46b2d40
10 changed files with 239 additions and 24 deletions

View File

@ -0,0 +1,26 @@
{ stdenv, fetchurl, pkgconfig, gtk, gettext }:
stdenv.mkDerivation rec {
name = "girara-0.1.2";
src = fetchurl {
url = "http://pwmt.org/projects/girara/download/${name}.tar.gz";
sha256 = "89231d0da3c790e0765ad85d74f64cf50051b8bafe6065882e34e378ab14ec99";
};
buildInputs = [ pkgconfig gtk gettext ];
makeFlags = "PREFIX=$(out)";
meta = {
homepage = http://pwmt.org/projects/girara/;
description = "User interface library";
longDescription = ''
girara is a library that implements a GTK+ based VIM-like user interface
that focuses on simplicity and minimalism.
'';
license = "free";
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -0,0 +1,11 @@
source $stdenv/setup
mkdir -pv $out/bin/
cat > $out/bin/zathura <<EOF
#!/bin/sh
exec $zathura --plugins-dir=$plugins_path "\$@"
EOF
chmod 755 $out/bin/zathura

View File

@ -0,0 +1,29 @@
{ stdenv, fetchurl, pkgconfig, gtk, girara, gettext }:
stdenv.mkDerivation rec {
version = "0.1.2";
name = "zathura-core-${version}";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/download/zathura-${version}.tar.gz";
sha256 = "a496c25071e54f675b65ee5eab02fd002c04c2d7d5cf4aa8a1cb517cc13beaef";
};
buildInputs = [ pkgconfig gtk girara gettext ];
makeFlags = "PREFIX=$(out)";
meta = {
homepage = http://pwmt.org/projects/zathura/;
description = "A core component for zathura PDF viewer";
license = "free";
platforms = stdenv.lib.platforms.linux;
# Set lower priority in order to provide user with a wrapper script called
# 'zathura' instead of real zathura executable. The wrapper will build
# plugin path argument before executing the original.
priority = 1;
};
}

View File

@ -1,27 +1,41 @@
{ stdenv, fetchurl, pkgconfig, gtk, poppler }:
{ callPackage, pkgs }:
stdenv.mkDerivation rec {
name = "zathura-0.0.8.4";
src = fetchurl {
url = "http://pwmt.org/download/${name}.tar.gz";
sha256 = "03iq6n7bpgrkq3l8b2ab3flcfxrqpxc1f3ycn31xr2b6bjwi72qn";
};
buildInputs = [ pkgconfig gtk poppler ];
rec {
inherit (pkgs) stdenv;
makeFlags = "PREFIX=$(out)";
meta = {
homepage = https://pwmt.org/zathura/;
description = "A highly customizable and functional PDF viewer";
longDescription = ''
Zathura is a highly customizable and functional PDF viewer based on the
poppler rendering library and the gtk+ toolkit. The idea behind zathura
is an application that provides a minimalistic and space saving interface
as well as an easy usage that mainly focuses on keyboard interaction.
'';
license = "free";
platforms = stdenv.lib.platforms.linux;
zathura_core = callPackage ./core { };
zathura_pdf_poppler = callPackage ./pdf-poppler { };
zathura_djvu = callPackage ./djvu { };
zathura_ps = callPackage ./ps { };
zathuraWrapper = stdenv.mkDerivation rec {
name = "zathura-0.1.2";
plugins_path = stdenv.lib.makeSearchPath "lib" [
zathura_pdf_poppler
zathura_djvu
zathura_ps
];
zathura = "${zathura_core}/bin/zathura";
builder = ./builder.sh;
meta = {
homepage = http://pwmt.org/projects/zathura/;
description = "A highly customizable and functional PDF viewer";
longDescription = ''
Zathura is a highly customizable and functional PDF viewer based on the
poppler rendering library and the gtk+ toolkit. The idea behind zathura
is an application that provides a minimalistic and space saving interface
as well as an easy usage that mainly focuses on keyboard interaction.
'';
license = "free";
};
};
}

View File

@ -0,0 +1,28 @@
{ stdenv, fetchurl, pkgconfig, gtk, zathura_core, girara, djvulibre, gettext }:
stdenv.mkDerivation rec {
name = "zathura-djvu-0.1.1";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
sha256 = "04adad7bf1bb392eae4b7b856fe7d40a137f8185ac274289df922758ae827172";
};
buildInputs = [ pkgconfig djvulibre gettext zathura_core gtk girara ];
patches = [ ./gtkflags.patch ];
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
meta = {
homepage = http://pwmt.org/projects/zathura/;
description = "A zathura DJVU plugin";
longDescription = ''
The zathura-djvu plugin adds DjVu support to zathura by using the
djvulibre library.
'';
license = "free";
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -0,0 +1,23 @@
--- a/config.mk 2012-05-14 01:13:09.009740082 +0400
+++ b/config.mk 2012-05-14 01:13:50.400525700 +0400
@@ -11,6 +11,9 @@
LIBDIR ?= ${PREFIX}/lib
# libs
+GTK_INC ?= $(shell pkg-config --cflags gtk+-2.0)
+GTK_LIB ?= $(shell pkg-config --libs gtk+-2.0)
+
CAIRO_INC ?= $(shell pkg-config --cflags cairo)
CAIRO_LIB ?= $(shell pkg-config --libs cairo)
@@ -29,8 +32,8 @@
PLUGINDIR = ${LIBDIR}/zathura
endif
-INCS = ${GIRARA_INC} ${GLIB_INC} ${DJVU_INC} ${ZATHURA_INC}
-LIBS = ${GIRARA_LIB} ${GLIB_LIB} ${DJVU_LIB}
+INCS = ${GIRARA_INC} ${GLIB_INC} ${DJVU_INC} ${ZATHURA_INC} ${GTK_INC}
+LIBS = ${GIRARA_LIB} ${GLIB_LIB} ${DJVU_LIB} ${GTK_LIB}
# flags
CFLAGS += -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS)

View File

@ -0,0 +1,25 @@
{ stdenv, fetchurl, pkgconfig, zathura_core, girara, poppler, gettext }:
stdenv.mkDerivation rec {
name = "zathura-pdf-poppler-0.1.1";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
sha256 = "bec5fee721fcaee9f4b53d3882908b19efa82815393aa8c3619ff948b909d4a7";
};
buildInputs = [ pkgconfig poppler gettext zathura_core girara ];
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
meta = {
homepage = http://pwmt.org/projects/zathura/;
description = "A zathura PDF plugin";
longDescription = ''
The zathura-pdf-poppler plugin adds PDF support to zathura by
using the poppler rendering engine.
'';
license = "free";
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -0,0 +1,28 @@
{ stdenv, fetchurl, pkgconfig, gtk, zathura_core, girara, libspectre, gettext }:
stdenv.mkDerivation rec {
name = "zathura-ps-0.1.0";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
sha256 = "1669fd11e436636cdedb2cde206b562f4f9c666cea9773f6f2014e765fd62789";
};
buildInputs = [ pkgconfig libspectre gettext zathura_core gtk girara ];
patches = [ ./gtkflags.patch ];
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
meta = {
homepage = http://pwmt.org/projects/zathura/;
description = "A zathura PS plugin";
longDescription = ''
The zathura-ps plugin adds PS support to zathura by using the
libspectre library.
'';
license = "free";
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -0,0 +1,25 @@
diff --git a/config.mk b/config.mk.new
index c3a7b37..0cbce67 100644
--- a/config.mk
+++ b/config.mk
@@ -10,6 +10,9 @@ ZATHURA_VERSION_CHECK ?= $(shell pkg-config --atleast-version=$(ZATHURA_MIN_VERS
PREFIX ?= /usr
# libs
+GTK_INC ?= $(shell pkg-config --cflags gtk+-2.0)
+GTK_LIB ?= $(shell pkg-config --libs gtk+-2.0)
+
CAIRO_INC ?= $(shell pkg-config --cflags cairo)
CAIRO_LIB ?= $(shell pkg-config --libs cairo)
@@ -26,8 +29,8 @@ ZATHURA_INC ?= $(shell pkg-config --cflags zathura)
PLUGINDIR ?= $(shell pkg-config --variable=plugindir zathura)
PLUGINDIR ?= ${PREFIX}/lib/zathura
-INCS = ${GLIB_INC} ${SPECTRE_INC} ${GIRARA_INC} ${ZATHURA_INC}
-LIBS = ${GLIB_LIB} ${SPECTRE_LIB} ${GIRARA_LIB}
+INCS = ${GLIB_INC} ${SPECTRE_INC} ${GIRARA_INC} ${ZATHURA_INC} ${GTK_INC}
+LIBS = ${GLIB_LIB} ${SPECTRE_LIB} ${GIRARA_LIB} ${GTK_LIB}
# flags
CFLAGS += -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS)

View File

@ -7965,7 +7965,13 @@ let
fltk = fltk13;
};
zathura = callPackage ../applications/misc/zathura { };
zathuraCollection = recurseIntoAttrs
(let callPackage = newScope pkgs.zathuraCollection; in
import ../applications/misc/zathura { inherit callPackage pkgs; });
zathura = zathuraCollection.zathuraWrapper;
girara = callPackage ../applications/misc/girara { };
zgrviewer = callPackage ../applications/graphics/zgrviewer {};