nixpkgs/pkgs/by-name/ev/evince/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

145 lines
2.8 KiB
Nix
Raw Normal View History

2021-12-11 12:04:07 +00:00
{ lib
, stdenv
, fetchurl
, meson
, ninja
2021-01-17 02:21:50 +00:00
, pkg-config
, gettext
, libxml2
, appstream
, desktop-file-utils
, glib
, gtk3
, pango
, atk
2019-05-22 11:03:39 +00:00
, gdk-pixbuf
, shared-mime-info
, itstool
, gnome
, poppler
, ghostscriptX
, djvulibre
, libspectre
, libarchive
2021-03-21 00:32:10 +00:00
, libhandy
, libsecret
, wrapGAppsHook3
, librsvg
, gobject-introspection
, yelp-tools
, gspell
, gsettings-desktop-schemas
, gnome-desktop
, dbus
, texlive
, gst_all_1
, gi-docgen
, supportMultimedia ? true # PDF multimedia
2019-02-13 21:47:50 +00:00
, libgxps
, supportXPS ? true # Open XML Paper Specification via libgxps
2021-12-02 14:28:26 +00:00
, withLibsecret ? true
}:
stdenv.mkDerivation (finalAttrs: {
pname = "evince";
version = "46.3.1";
2019-10-01 04:37:57 +00:00
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/evince/${lib.versions.major finalAttrs.version}/evince-${finalAttrs.version}.tar.xz";
hash = "sha256-lFwgpvI4ObDVMycpFxRY6QaA2oJk6Zxvn0HCGcfu7nw=";
};
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
2019-10-01 04:37:57 +00:00
appstream
desktop-file-utils
2019-10-01 04:37:57 +00:00
gettext
gobject-introspection
gi-docgen
2019-10-01 04:37:57 +00:00
itstool
meson
ninja
2021-01-17 02:21:50 +00:00
pkg-config
wrapGAppsHook3
2019-10-01 04:37:57 +00:00
yelp-tools
];
buildInputs = [
atk
2019-10-01 04:37:57 +00:00
dbus # only needed to find the service directory
djvulibre
2019-05-22 11:03:39 +00:00
gdk-pixbuf
ghostscriptX
2019-10-01 04:37:57 +00:00
glib
gnome-desktop
gsettings-desktop-schemas
gspell
gtk3
libarchive
2021-03-21 00:32:10 +00:00
libhandy
librsvg
2019-10-01 04:37:57 +00:00
libspectre
libxml2
pango
poppler
texlive.bin.core # kpathsea for DVI support
2021-12-02 14:28:26 +00:00
] ++ lib.optionals withLibsecret [
libsecret
2021-10-07 03:44:21 +00: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
]);
mesonFlags = [
"-Dnautilus=false"
"-Dps=enabled"
2021-12-02 14:28:26 +00:00
] ++ lib.optionals (!withLibsecret) [
"-Dkeyring=disabled"
] ++ lib.optionals (!supportMultimedia) [
"-Dmultimedia=disabled"
];
preFixup = ''
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share")
'';
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "evince";
};
};
meta = with lib; {
homepage = "https://apps.gnome.org/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 03:44:21 +00:00
license = licenses.gpl2Plus;
platforms = platforms.unix;
2023-12-20 13:48:35 +00:00
mainProgram = "evince";
2021-10-07 03:44:21 +00:00
maintainers = teams.gnome.members ++ teams.pantheon.members;
};
})