nixpkgs/pkgs/applications/misc/zathura/core/default.nix

56 lines
1.5 KiB
Nix
Raw Normal View History

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