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