mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
zathura: fix fish completions
The fish completion checks the plugin directory for supported file types to complete. However the plugin dir checked was the one of the zathura_core derivation which of course has no plugin dir. We now patch up the referenced path in the wrapper derivation.
This commit is contained in:
parent
178ec8974f
commit
9a27606ab1
|
@ -7,10 +7,19 @@ symlinkJoin {
|
|||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
postBuild = let
|
||||
fishCompletion = "share/fish/vendor_completions.d/zathura.fish";
|
||||
in ''
|
||||
makeWrapper ${zathura_core.bin}/bin/zathura $out/bin/zathura \
|
||||
--prefix PATH ":" "${lib.makeBinPath [ file ]}" \
|
||||
--add-flags --plugins-dir="$out/lib/zathura"
|
||||
|
||||
# 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"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue