nixpkgs/pkgs/desktops/gnome/core/evince/default.nix

159 lines
3.2 KiB
Nix
Raw Normal View History

2021-12-11 13:04:07 +01:00
{ lib
, stdenv
, fetchurl
2021-12-11 13:04:07 +01:00
, fetchpatch
, meson
, ninja
2021-01-17 03:21:50 +01:00
, pkg-config
, gettext
, libxml2
, appstream
, glib
, gtk3
, pango
, atk
2019-05-22 13:03:39 +02:00
, gdk-pixbuf
, shared-mime-info
, itstool
, gnome
, poppler
, ghostscriptX
, djvulibre
, libspectre
, libarchive
2021-03-21 01:32:10 +01:00
, libhandy
, libsecret
, wrapGAppsHook
, librsvg
, gobject-introspection
, yelp-tools
, gspell
, adwaita-icon-theme
, gsettings-desktop-schemas
, gnome-desktop
, dbus
2021-10-07 05:44:21 +02:00
, pantheon
, python3
, texlive
, t1lib
, gst_all_1
2019-10-01 06:37:57 +02:00
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_43
, supportMultimedia ? true # PDF multimedia
2019-02-13 22:47:50 +01:00
, libgxps
, supportXPS ? true # Open XML Paper Specification via libgxps
2021-10-07 05:44:21 +02:00
, withPantheon ? false
}:
stdenv.mkDerivation rec {
pname = "evince";
version = "41.3";
2019-10-01 06:37:57 +02:00
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
2021-03-21 01:32:10 +01:00
url = "mirror://gnome/sources/evince/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "M0awH5vcjy1f/qkvEQoJDGSjYklCtbVDqtRZKp3jO7A=";
};
2021-10-07 05:44:21 +02:00
patches = lib.optionals withPantheon [
# Make this respect dark mode settings from Pantheon
2021-12-11 13:04:07 +01:00
# https://github.com/elementary/evince/pull/21
# https://github.com/elementary/evince/pull/31
(fetchpatch {
url = "https://raw.githubusercontent.com/elementary/evince/c8364019ee2c2dffd2a1bccf79b8f4e526aa22af/dark-style.patch";
sha256 = "sha256-nKELRXnM6gMRTGmWdO1Qqlo9ciy+4HOK5z2CYOoi2Lo=";
})
2021-10-07 05:44:21 +02:00
];
postPatch = ''
chmod +x meson_post_install.py
patchShebangs meson_post_install.py
'';
nativeBuildInputs = [
2019-10-01 06:37:57 +02:00
appstream
docbook-xsl-nons
docbook_xml_dtd_43
gettext
gobject-introspection
gtk-doc
itstool
meson
ninja
2021-01-17 03:21:50 +01:00
pkg-config
python3
2019-10-01 06:37:57 +02:00
wrapGAppsHook
yelp-tools
];
buildInputs = [
2019-10-01 06:37:57 +02:00
adwaita-icon-theme
atk
2019-10-01 06:37:57 +02:00
dbus # only needed to find the service directory
djvulibre
2019-05-22 13:03:39 +02:00
gdk-pixbuf
ghostscriptX
2019-10-01 06:37:57 +02:00
glib
gnome-desktop
gsettings-desktop-schemas
gspell
gtk3
libarchive
2021-03-21 01:32:10 +01:00
libhandy
librsvg
2019-10-01 06:37:57 +02:00
libsecret
libspectre
libxml2
pango
poppler
t1lib
2019-10-01 06:37:57 +02:00
texlive.bin.core # kpathsea for DVI support
2021-10-07 05:44:21 +02:00
] ++ lib.optionals supportXPS [
libgxps
] ++ lib.optionals supportMultimedia (with gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
gst-libav
]) ++ lib.optionals withPantheon [
pantheon.granite
];
mesonFlags = [
"-Dnautilus=false"
"-Dps=enabled"
];
2019-02-13 22:47:50 +01:00
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
preFixup = ''
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share")
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
};
};
meta = with lib; {
homepage = "https://wiki.gnome.org/Apps/Evince";
description = "GNOME's document viewer";
longDescription = ''
Evince is a document viewer for multiple document formats. It
currently supports PDF, PostScript, DjVu, TIFF and DVI. The goal
of Evince is to replace the multiple document viewers that exist
on the GNOME Desktop with a single simple application.
'';
2021-10-07 05:44:21 +02:00
license = licenses.gpl2Plus;
platforms = platforms.linux;
2021-10-07 05:44:21 +02:00
maintainers = teams.gnome.members ++ teams.pantheon.members;
};
}