diff options
author | Sergey Mironov <ierton@gmail.com> | 2012-05-15 01:43:46 +0400 |
---|---|---|
committer | Sergey Mironov <ierton@gmail.com> | 2012-08-16 18:25:52 +0400 |
commit | d339184bbf05fe6ee93369625dd2c9e5e69005e5 (patch) | |
tree | 772575c6b5183e2b8ec0c6c3e27e89892e8f8570 /pkgs/applications/misc | |
parent | 03228d60fe25ad7110b55eb2ab01231d57d06631 (diff) |
zathura: version 0.1.2 with plugins
Expression handles new modular structure of zathura and adds support for djvu, pdf and ps plugins.
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r-- | pkgs/applications/misc/girara/default.nix | 26 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/builder.sh | 11 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/core/default.nix | 29 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/default.nix | 64 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/djvu/default.nix | 28 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/djvu/gtkflags.patch | 23 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/pdf-poppler/default.nix | 25 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/ps/default.nix | 28 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/ps/gtkflags.patch | 25 |
9 files changed, 234 insertions, 25 deletions
diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix new file mode 100644 index 0000000000000..074f70448cd2b --- /dev/null +++ b/pkgs/applications/misc/girara/default.nix @@ -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 = https://pwmt.org/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; + }; +} + diff --git a/pkgs/applications/misc/zathura/builder.sh b/pkgs/applications/misc/zathura/builder.sh new file mode 100644 index 0000000000000..9ca45b2cc9921 --- /dev/null +++ b/pkgs/applications/misc/zathura/builder.sh @@ -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 + diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix new file mode 100644 index 0000000000000..8b23fba5e270c --- /dev/null +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -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 = https://pwmt.org/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; + }; +} diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix index 2e58a028a30fb..17ce88a820315 100644 --- a/pkgs/applications/misc/zathura/default.nix +++ b/pkgs/applications/misc/zathura/default.nix @@ -1,27 +1,41 @@ -{ stdenv, fetchurl, pkgconfig, gtk, poppler }: - -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 ]; - - 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; +{ callPackage, pkgs }: + +rec { + inherit (pkgs) stdenv; + + 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 = 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"; + }; }; } + diff --git a/pkgs/applications/misc/zathura/djvu/default.nix b/pkgs/applications/misc/zathura/djvu/default.nix new file mode 100644 index 0000000000000..9d3ff5da4822f --- /dev/null +++ b/pkgs/applications/misc/zathura/djvu/default.nix @@ -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 = https://pwmt.org/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; + }; +} + diff --git a/pkgs/applications/misc/zathura/djvu/gtkflags.patch b/pkgs/applications/misc/zathura/djvu/gtkflags.patch new file mode 100644 index 0000000000000..2a2fe298a7b9d --- /dev/null +++ b/pkgs/applications/misc/zathura/djvu/gtkflags.patch @@ -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) diff --git a/pkgs/applications/misc/zathura/pdf-poppler/default.nix b/pkgs/applications/misc/zathura/pdf-poppler/default.nix new file mode 100644 index 0000000000000..0d7b4cc830f8c --- /dev/null +++ b/pkgs/applications/misc/zathura/pdf-poppler/default.nix @@ -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 = https://pwmt.org/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; + }; +} diff --git a/pkgs/applications/misc/zathura/ps/default.nix b/pkgs/applications/misc/zathura/ps/default.nix new file mode 100644 index 0000000000000..7c733e5380d46 --- /dev/null +++ b/pkgs/applications/misc/zathura/ps/default.nix @@ -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 = https://pwmt.org/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; + }; +} + diff --git a/pkgs/applications/misc/zathura/ps/gtkflags.patch b/pkgs/applications/misc/zathura/ps/gtkflags.patch new file mode 100644 index 0000000000000..7c944a12f0ef9 --- /dev/null +++ b/pkgs/applications/misc/zathura/ps/gtkflags.patch @@ -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) |