about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/gnome/core/evince/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/desktops/gnome/core/evince/default.nix')
-rw-r--r--nixpkgs/pkgs/desktops/gnome/core/evince/default.nix32
1 files changed, 25 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/desktops/gnome/core/evince/default.nix b/nixpkgs/pkgs/desktops/gnome/core/evince/default.nix
index 11cd3735e1d5..45812dbc901a 100644
--- a/nixpkgs/pkgs/desktops/gnome/core/evince/default.nix
+++ b/nixpkgs/pkgs/desktops/gnome/core/evince/default.nix
@@ -30,6 +30,7 @@
 , gsettings-desktop-schemas
 , gnome-desktop
 , dbus
+, pantheon
 , python3
 , texlive
 , t1lib
@@ -40,19 +41,27 @@
 , supportMultimedia ? true # PDF multimedia
 , libgxps
 , supportXPS ? true # Open XML Paper Specification via libgxps
+, withPantheon ? false
 }:
 
 stdenv.mkDerivation rec {
   pname = "evince";
-  version = "40.4";
+  version = "41.2";
 
   outputs = [ "out" "dev" "devdoc" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/evince/${lib.versions.major version}/${pname}-${version}.tar.xz";
-    sha256 = "M0IFAODgYPF4pDUGMZfULa57Z+OcxDepZRCjPd9+lfs=";
+    sha256 = "lautDW/urJVg2zq4C6fF6rsf3xyg47PJMzmvBUU6JNg=";
   };
 
+  patches = lib.optionals withPantheon [
+    # Make this respect dark mode settings from Pantheon
+    # https://github.com/elementary/evince
+    # The patch currently differs from upstream (updated for evince 41).
+    ./pantheon-dark-style.patch
+  ];
+
   postPatch = ''
     chmod +x meson_post_install.py
     patchShebangs meson_post_install.py
@@ -96,9 +105,18 @@ stdenv.mkDerivation rec {
     poppler
     t1lib
     texlive.bin.core # kpathsea for DVI support
-  ] ++ lib.optional 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 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"
@@ -128,8 +146,8 @@ stdenv.mkDerivation rec {
       on the GNOME Desktop with a single simple application.
     '';
 
-    license = lib.licenses.gpl2Plus;
+    license = licenses.gpl2Plus;
     platforms = platforms.linux;
-    maintainers = teams.gnome.members;
+    maintainers = teams.gnome.members ++ teams.pantheon.members;
   };
 }