summary refs log tree commit diff
path: root/pkgs/applications/misc/zathura/default.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-08-26 03:42:08 +0300
committerNikolay Amiantov <ab@fmap.me>2016-08-26 03:45:58 +0300
commit211adbeb389c5930fe132bb3c631160b92e76d0f (patch)
treed5bd6e08a84dee99a877c667c8e836e4ccb9a982 /pkgs/applications/misc/zathura/default.nix
parent8d10928ad0913936ca844293cacc3c9af67d419a (diff)
downloadnixpkgs-211adbeb389c5930fe132bb3c631160b92e76d0f.tar
nixpkgs-211adbeb389c5930fe132bb3c631160b92e76d0f.tar.gz
nixpkgs-211adbeb389c5930fe132bb3c631160b92e76d0f.tar.bz2
nixpkgs-211adbeb389c5930fe132bb3c631160b92e76d0f.tar.lz
nixpkgs-211adbeb389c5930fe132bb3c631160b92e76d0f.tar.xz
nixpkgs-211adbeb389c5930fe132bb3c631160b92e76d0f.tar.zst
nixpkgs-211adbeb389c5930fe132bb3c631160b92e76d0f.zip
zathura: cleanup and hide zathuraCollection
Fixes #17787.
Diffstat (limited to 'pkgs/applications/misc/zathura/default.nix')
-rw-r--r--pkgs/applications/misc/zathura/default.nix65
1 files changed, 18 insertions, 47 deletions
diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix
index ed121be6dcd..e67bebb3710 100644
--- a/pkgs/applications/misc/zathura/default.nix
+++ b/pkgs/applications/misc/zathura/default.nix
@@ -1,59 +1,30 @@
-{ callPackage, lib, pkgs, fetchurl, stdenv, useMupdf, synctexSupport ? true }:
+{ pkgs, useMupdf ? true, synctexSupport ? true }:
 
-rec {
-  inherit stdenv;
+let
+  callPackage = pkgs.newScope self;
 
-  icon = ./icon.xpm;
-
-  zathura_core = callPackage ./core {
-    gtk = pkgs.gtk3;
-    zathura_icon = icon;
-    inherit synctexSupport;
-  };
-
-  zathura_pdf_poppler = callPackage ./pdf-poppler { };
-
-  zathura_pdf_mupdf = callPackage ./pdf-mupdf {
-    gtk = pkgs.gtk3;
-  };
-
-  zathura_djvu = callPackage ./djvu {
+  self = rec {
     gtk = pkgs.gtk3;
-  };
 
-  zathura_ps = callPackage ./ps {
-    gtk = pkgs.gtk3;
-  };
-
-  zathuraWrapper = stdenv.mkDerivation {
-
-    inherit zathura_core icon;
+    zathura_core = callPackage ./core {
+      inherit synctexSupport;
+    };
 
-    name = "zathura-${zathura_core.version}";
+    zathura_pdf_poppler = callPackage ./pdf-poppler { };
 
-    plugins_path = stdenv.lib.makeLibraryPath [
-      zathura_djvu
-      zathura_ps
-      (if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler)
-    ];
+    zathura_pdf_mupdf = callPackage ./pdf-mupdf { };
 
-    builder = ./builder.sh;
+    zathura_djvu = callPackage ./djvu { };
 
-    preferLocalBuild = true;
+    zathura_ps = callPackage ./ps { };
 
-    meta = with lib; {
-      homepage = http://pwmt.org/projects/zathura/;
-      description = "A highly customizable and functional PDF viewer";
-      longDescription = ''
-        Zathura is a highly customizable and functional PDF viewer based on the
-        poppler rendering library and the gtk+ toolkit. The idea behind zathura
-        is an application that provides a minimalistic and space saving interface
-        as well as an easy usage that mainly focuses on keyboard interaction.
-      '';
-      license = licenses.zlib;
-      platforms = platforms.linux;
-      maintainers = with maintainers;[ garbas smironov ];
+    zathuraWrapper = callPackage ./wrapper.nix {
+      plugins = [
+        zathura_djvu
+        zathura_ps
+        (if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler)
+      ];
     };
   };
-}
 
+in self.zathuraWrapper