2018-08-21 16:27:31 +01:00
|
|
|
{ symlinkJoin, lib, makeWrapper, zathura_core, file, plugins ? [] }:
|
2020-09-13 17:45:23 +01:00
|
|
|
symlinkJoin {
|
2016-08-26 01:42:08 +01:00
|
|
|
name = "zathura-with-plugins-${zathura_core.version}";
|
|
|
|
|
2020-09-13 17:45:23 +01:00
|
|
|
paths = with zathura_core; [ man dev out ] ++ plugins;
|
2016-08-26 01:42:08 +01:00
|
|
|
|
2020-03-25 07:16:12 +00:00
|
|
|
|
2016-08-26 01:42:08 +01:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2021-01-04 18:32:18 +00:00
|
|
|
postBuild = let
|
|
|
|
fishCompletion = "share/fish/vendor_completions.d/zathura.fish";
|
|
|
|
in ''
|
2018-08-11 18:04:06 +01:00
|
|
|
makeWrapper ${zathura_core.bin}/bin/zathura $out/bin/zathura \
|
2018-08-21 16:27:31 +01:00
|
|
|
--prefix PATH ":" "${lib.makeBinPath [ file ]}" \
|
2020-09-13 17:45:23 +01:00
|
|
|
--add-flags --plugins-dir="$out/lib/zathura"
|
2021-01-04 18:32:18 +00:00
|
|
|
|
|
|
|
# zathura fish completion references the zathura_core derivation to
|
|
|
|
# check for supported plugins which live in the wrapper derivation,
|
|
|
|
# so we need to fix the path to reference $out instead.
|
|
|
|
rm "$out/${fishCompletion}"
|
|
|
|
substitute "${zathura_core.out}/${fishCompletion}" "$out/${fishCompletion}" \
|
|
|
|
--replace "${zathura_core.out}" "$out"
|
2016-08-26 01:42:08 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://git.pwmt.org/pwmt/zathura/";
|
2016-08-26 01:42:08 +01:00
|
|
|
description = "A highly customizable and functional PDF viewer";
|
|
|
|
longDescription = ''
|
|
|
|
Zathura is a highly customizable and functional PDF viewer based on the
|
2019-09-03 23:49:40 +01:00
|
|
|
poppler rendering library and the GTK toolkit. The idea behind zathura
|
2016-08-26 01:42:08 +01:00
|
|
|
is an application that provides a minimalistic and space saving interface
|
|
|
|
as well as an easy usage that mainly focuses on keyboard interaction.
|
|
|
|
'';
|
|
|
|
license = licenses.zlib;
|
2018-02-14 19:52:15 +00:00
|
|
|
platforms = platforms.unix;
|
2020-09-13 17:45:23 +01:00
|
|
|
maintainers = with maintainers; [ smironov globin TethysSvensson ];
|
2016-08-26 01:42:08 +01:00
|
|
|
};
|
|
|
|
}
|