diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index 56701cffb8cf..4cf05a21636a 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, meson, ninja, makeWrapper, pkgconfig , appstream-glib, desktop-file-utils, python3 , gtk, girara, gettext, libxml2 -, file, sqlite, glib, texlive, libintl, libseccomp +, sqlite, glib, texlive, libintl, libseccomp , gtk-mac-integration, synctexSupport ? true }: @@ -18,22 +18,19 @@ stdenv.mkDerivation rec { sha256 = "1znr3psqda06xklzj8mn452w908llapcg1rj468jwpg0wzv6pxfn"; }; + outputs = [ "bin" "man" "dev" "out" ]; + nativeBuildInputs = [ meson ninja pkgconfig appstream-glib desktop-file-utils python3.pkgs.sphinx gettext makeWrapper libxml2 ]; buildInputs = [ - file gtk girara libintl libseccomp + gtk girara libintl libseccomp sqlite glib ] ++ optional synctexSupport texlive.bin.core ++ optional stdenv.isDarwin [ gtk-mac-integration ]; - postInstall = '' - wrapProgram "$out/bin/zathura" \ - --prefix PATH ":" "${makeBinPath [ file ]}" - ''; - meta = { homepage = https://pwmt.org/projects/zathura/; description = "A core component for zathura PDF viewer"; diff --git a/pkgs/applications/misc/zathura/wrapper.nix b/pkgs/applications/misc/zathura/wrapper.nix index 64f617782f2d..b81d12947e41 100644 --- a/pkgs/applications/misc/zathura/wrapper.nix +++ b/pkgs/applications/misc/zathura/wrapper.nix @@ -1,4 +1,4 @@ -{ symlinkJoin, lib, makeWrapper, zathura_core, plugins ? [] }: +{ symlinkJoin, lib, makeWrapper, zathura_core, file, plugins ? [] }: let pluginsPath = lib.makeSearchPath "lib/zathura" plugins; @@ -6,12 +6,14 @@ let in symlinkJoin { name = "zathura-with-plugins-${zathura_core.version}"; - paths = [ zathura_core ]; + paths = with zathura_core; [ man dev out ]; buildInputs = [ makeWrapper ]; postBuild = '' - wrapProgram $out/bin/zathura --add-flags --plugins-dir=${pluginsPath} + makeWrapper ${zathura_core.bin}/bin/zathura $out/bin/zathura \ + --prefix PATH ":" "${lib.makeBinPath [ file ]}" \ + --add-flags --plugins-dir=${pluginsPath} ''; meta = with lib; {