Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 157 lines 2.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 meson, 6 ninja, 7 pkg-config, 8 gettext, 9 libxml2, 10 appstream, 11 desktop-file-utils, 12 glib, 13 gtk3, 14 pango, 15 atk, 16 gdk-pixbuf, 17 shared-mime-info, 18 itstool, 19 gnome, 20 poppler, 21 ghostscriptX, 22 djvulibre, 23 libspectre, 24 libarchive, 25 libgxps, 26 libhandy, 27 libsecret, 28 wrapGAppsHook3, 29 librsvg, 30 gobject-introspection, 31 yelp-tools, 32 gspell, 33 gsettings-desktop-schemas, 34 gnome-desktop, 35 dbus, 36 texlive, 37 gst_all_1, 38 gi-docgen, 39 supportMultimedia ? true, # PDF multimedia 40 withLibsecret ? true, 41}: 42 43stdenv.mkDerivation (finalAttrs: { 44 pname = "evince"; 45 version = "48.1"; 46 47 outputs = [ 48 "out" 49 "dev" 50 "devdoc" 51 ]; 52 53 src = fetchurl { 54 url = "mirror://gnome/sources/evince/${lib.versions.major finalAttrs.version}/evince-${finalAttrs.version}.tar.xz"; 55 hash = "sha256-fYuab6OgXT9bkEiFkCdojHOniP9ukjvDlFEmiElD+hA="; 56 }; 57 58 depsBuildBuild = [ 59 pkg-config 60 ]; 61 62 nativeBuildInputs = [ 63 appstream 64 desktop-file-utils 65 gettext 66 gobject-introspection 67 gi-docgen 68 itstool 69 meson 70 ninja 71 pkg-config 72 wrapGAppsHook3 73 yelp-tools 74 ]; 75 76 buildInputs = [ 77 atk 78 dbus # only needed to find the service directory 79 djvulibre 80 gdk-pixbuf 81 ghostscriptX 82 glib 83 gnome-desktop 84 gsettings-desktop-schemas 85 gspell 86 gtk3 87 libarchive 88 libgxps 89 libhandy 90 librsvg 91 libspectre 92 libxml2 93 pango 94 poppler 95 texlive.bin.core # kpathsea for DVI support 96 ] 97 ++ lib.optionals withLibsecret [ 98 libsecret 99 ] 100 ++ lib.optionals supportMultimedia ( 101 with gst_all_1; 102 [ 103 gstreamer 104 gst-plugins-base 105 gst-plugins-good 106 gst-plugins-bad 107 gst-plugins-ugly 108 gst-libav 109 ] 110 ); 111 112 mesonFlags = [ 113 "-Dnautilus=false" 114 "-Dps=enabled" 115 ] 116 ++ lib.optionals (!withLibsecret) [ 117 "-Dkeyring=disabled" 118 ] 119 ++ lib.optionals (!supportMultimedia) [ 120 "-Dmultimedia=disabled" 121 ]; 122 123 preFixup = '' 124 gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share") 125 ''; 126 127 postFixup = '' 128 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. 129 moveToOutput "share/doc" "$devdoc" 130 ''; 131 132 passthru = { 133 updateScript = gnome.updateScript { 134 packageName = "evince"; 135 }; 136 }; 137 138 meta = with lib; { 139 homepage = "https://apps.gnome.org/Evince/"; 140 description = "GNOME's document viewer"; 141 142 longDescription = '' 143 Evince is a document viewer for multiple document formats. It 144 currently supports PDF, PostScript, DjVu, TIFF and DVI. The goal 145 of Evince is to replace the multiple document viewers that exist 146 on the GNOME Desktop with a single simple application. 147 ''; 148 149 license = licenses.gpl2Plus; 150 platforms = platforms.unix; 151 mainProgram = "evince"; 152 teams = [ 153 teams.gnome 154 teams.pantheon 155 ]; 156 }; 157})