nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 112 lines 2.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 meson, 6 ninja, 7 wrapGAppsHook3, 8 pkg-config, 9 gitUpdater, 10 appstream-glib, 11 json-glib, 12 desktop-file-utils, 13 python3, 14 gtk3, 15 girara, 16 gettext, 17 gnome, 18 libheif, 19 libjxl, 20 libxml2, 21 check, 22 sqlite, 23 glib, 24 texlive, 25 libintl, 26 libseccomp, 27 file, 28 librsvg, 29 gtk-mac-integration, 30 webp-pixbuf-loader, 31}: 32 33stdenv.mkDerivation (finalAttrs: { 34 pname = "zathura"; 35 version = "0.5.12"; 36 37 src = fetchurl { 38 url = "https://pwmt.org/projects/zathura/download/zathura-${finalAttrs.version}.tar.xz"; 39 hash = "sha256-6Ehw+/lrdmuCJKPzps58z6Nu+jtpGcyKL792XqTf5HY="; 40 }; 41 42 outputs = [ 43 "bin" 44 "man" 45 "dev" 46 "out" 47 ]; 48 49 # Flag list: 50 # https://github.com/pwmt/zathura/blob/master/meson_options.txt 51 mesonFlags = [ 52 "-Dmanpages=enabled" 53 "-Dconvert-icon=enabled" 54 "-Dsynctex=enabled" 55 "-Dtests=disabled" 56 # by default, zathura searches for zathurarc under $out/etc 57 "-Dsysconfdir=/etc" 58 # Make sure tests are enabled for doCheck 59 # (lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck) 60 (lib.mesonEnable "seccomp" stdenv.hostPlatform.isLinux) 61 (lib.mesonEnable "landlock" stdenv.hostPlatform.isLinux) 62 ]; 63 64 nativeBuildInputs = [ 65 meson 66 ninja 67 pkg-config 68 desktop-file-utils 69 python3.pythonOnBuildForHost.pkgs.sphinx 70 gettext 71 wrapGAppsHook3 72 libxml2 73 appstream-glib 74 ]; 75 76 buildInputs = [ 77 gtk3 78 girara 79 libintl 80 sqlite 81 glib 82 file 83 librsvg 84 check 85 json-glib 86 texlive.bin.core 87 ] 88 ++ lib.optional stdenv.hostPlatform.isLinux libseccomp 89 ++ lib.optional stdenv.hostPlatform.isDarwin gtk-mac-integration; 90 91 # add support for more image formats 92 env.GDK_PIXBUF_MODULE_FILE = gnome._gdkPixbufCacheBuilder_DO_NOT_USE { 93 extraLoaders = [ 94 libheif.out 95 libjxl 96 librsvg 97 webp-pixbuf-loader 98 ]; 99 }; 100 101 doCheck = !stdenv.hostPlatform.isDarwin; 102 103 passthru.updateScript = gitUpdater { }; 104 105 meta = { 106 homepage = "https://pwmt.org/projects/zathura"; 107 description = "Core component for zathura PDF viewer"; 108 license = lib.licenses.zlib; 109 platforms = lib.platforms.unix; 110 maintainers = with lib.maintainers; [ globin ]; 111 }; 112})