2017-02-15 14:01:40 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, pkgconfig
|
|
|
|
, gtk, girara, ncurses, gettext, docutils
|
|
|
|
, file, sqlite, glib, texlive
|
|
|
|
, synctexSupport ? true
|
|
|
|
}:
|
2016-06-10 15:04:22 +01:00
|
|
|
|
|
|
|
assert synctexSupport -> texlive != null;
|
2012-05-14 22:43:46 +01:00
|
|
|
|
2017-02-15 14:01:40 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2012-05-14 22:43:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-02-15 14:01:40 +00:00
|
|
|
name = "zathura-core-${version}";
|
|
|
|
version = "0.3.7";
|
2012-05-14 22:43:46 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-02-15 14:01:40 +00:00
|
|
|
url = "http://pwmt.org/projects/zathura/download/zathura-${version}.tar.gz";
|
|
|
|
sha256 = "1w0g74dq4z2vl3f99s2gkaqrb5pskgzig10qhbxj4gq9yj4zzbr2";
|
2012-05-14 22:43:46 +01:00
|
|
|
};
|
|
|
|
|
2016-08-26 01:42:08 +01:00
|
|
|
icon = ./icon.xpm;
|
|
|
|
|
2017-09-14 20:24:37 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2017-02-15 14:01:40 +00:00
|
|
|
buildInputs = [
|
2017-09-14 20:24:37 +01:00
|
|
|
file gtk girara
|
2017-02-15 14:01:40 +00:00
|
|
|
gettext makeWrapper sqlite glib
|
|
|
|
] ++ optional synctexSupport texlive.bin.core;
|
2016-03-01 19:41:31 +00:00
|
|
|
|
2016-04-16 17:57:59 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
|
2012-05-14 22:43:46 +01:00
|
|
|
|
2014-10-23 12:57:30 +01:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"RSTTOMAN=${docutils}/bin/rst2man.py"
|
|
|
|
"VERBOSE=1"
|
2016-02-01 17:18:39 +00:00
|
|
|
"TPUT=${ncurses.out}/bin/tput"
|
2017-02-15 14:01:40 +00:00
|
|
|
(optionalString synctexSupport "WITH_SYNCTEX=1")
|
|
|
|
];
|
2012-05-14 22:43:46 +01:00
|
|
|
|
2013-04-26 12:21:56 +01:00
|
|
|
postInstall = ''
|
2014-02-20 09:31:16 +00:00
|
|
|
wrapProgram "$out/bin/zathura" \
|
2017-02-15 14:01:40 +00:00
|
|
|
--prefix PATH ":" "${makeBinPath [ file ]}" \
|
2014-02-20 09:31:16 +00:00
|
|
|
--prefix XDG_CONFIG_DIRS ":" "$out/etc"
|
|
|
|
|
2016-08-26 01:42:08 +01:00
|
|
|
install -Dm644 $icon $out/share/pixmaps/pwmt.xpm
|
2014-02-20 09:31:16 +00:00
|
|
|
mkdir -pv $out/etc
|
2016-08-26 01:42:08 +01:00
|
|
|
echo "set window-icon $out/share/pixmaps/pwmt.xpm" > $out/etc/zathurarc
|
|
|
|
echo "Icon=pwmt" >> $out/share/applications/zathura.desktop
|
2013-04-26 12:21:56 +01:00
|
|
|
'';
|
|
|
|
|
2017-02-15 14:01:40 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://pwmt.org/projects/zathura/;
|
2012-08-16 15:33:25 +01:00
|
|
|
description = "A core component for zathura PDF viewer";
|
2017-02-15 14:01:40 +00:00
|
|
|
license = licenses.zlib;
|
|
|
|
platforms = platforms.linux;
|
2016-08-26 01:42:08 +01:00
|
|
|
maintainers = with maintainers; [ garbas ];
|
2012-05-14 22:43:46 +01:00
|
|
|
};
|
|
|
|
}
|