2014-02-20 10:31:16 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gtk, girara, gettext, docutils, file, makeWrapper, zathura_icon }:
|
2012-05-14 23:43:46 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-02-19 09:20:21 +01:00
|
|
|
version = "0.2.7";
|
2012-05-14 23:43:46 +02:00
|
|
|
name = "zathura-core-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://pwmt.org/projects/zathura/download/zathura-${version}.tar.gz";
|
2014-02-19 09:20:21 +01:00
|
|
|
sha256 = "ef43be7705612937d095bfbe719a03503bf7e45493ea9409cb43a45cf96f0daf";
|
2012-05-14 23:43:46 +02:00
|
|
|
};
|
|
|
|
|
2013-11-23 15:19:54 +01:00
|
|
|
buildInputs = [ pkgconfig file gtk girara gettext makeWrapper ];
|
2012-05-14 23:43:46 +02:00
|
|
|
|
2013-02-27 23:36:25 +01:00
|
|
|
# Bug in zathura build system: we should remove empty manfiles in order them
|
|
|
|
# to be compiled properly
|
|
|
|
preBuild = ''
|
|
|
|
rm zathura.1
|
|
|
|
rm zathurarc.5
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" "RSTTOMAN=${docutils}/bin/rst2man.py" "VERBOSE=1" ];
|
2012-05-14 23:43:46 +02:00
|
|
|
|
2013-04-26 13:21:56 +02:00
|
|
|
postInstall = ''
|
2014-02-20 10:31:16 +01:00
|
|
|
wrapProgram "$out/bin/zathura" \
|
|
|
|
--prefix PATH ":" "${file}/bin" \
|
|
|
|
--prefix XDG_CONFIG_DIRS ":" "$out/etc"
|
|
|
|
|
|
|
|
mkdir -pv $out/etc
|
|
|
|
echo "set window-icon ${zathura_icon}" > $out/etc/zathurarc
|
2013-04-26 13:21:56 +02:00
|
|
|
'';
|
|
|
|
|
2012-05-14 23:43:46 +02:00
|
|
|
meta = {
|
2012-08-16 16:33:25 +02:00
|
|
|
homepage = http://pwmt.org/projects/zathura/;
|
|
|
|
description = "A core component for zathura PDF viewer";
|
2013-02-23 11:39:32 +01:00
|
|
|
license = stdenv.lib.licenses.zlib;
|
2012-05-14 23:43:46 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2013-02-23 11:39:32 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.garbas ];
|
2012-05-14 23:43:46 +02:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
};
|
|
|
|
}
|