diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2024-09-28 15:19:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-28 15:19:20 +0200 |
commit | c813969149a415f1eda8fecbabb6b54cd119a248 (patch) | |
tree | 01ac4db7d3fd434aa5533f02fc4da68364c6e0b7 /pkgs | |
parent | ef1ecffdbe0bcd9494639d3ecb0ee09b959acb01 (diff) | |
parent | 94324a6d3c6035cd5520580240bbb3680792ac99 (diff) |
zathuraPkgs: turn into scope, and other small cleanups (#325226)
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/misc/zathura/default.nix | 31 | ||||
-rw-r--r-- | pkgs/applications/misc/zathura/wrapper.nix | 13 |
2 files changed, 27 insertions, 17 deletions
diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix index dd8c9b143a662..88241856632dc 100644 --- a/pkgs/applications/misc/zathura/default.nix +++ b/pkgs/applications/misc/zathura/default.nix @@ -1,14 +1,21 @@ { config, - pkgs, + lib, + stdenv, + newScope, + gtk3, useMupdf ? true, }: -let - callPackage = pkgs.newScope self; +lib.makeScope newScope ( + self: + let + callPackage = self.callPackage; + in + { + inherit useMupdf; - self = rec { - gtk = pkgs.gtk3; + gtk = gtk3; zathura_core = callPackage ./core { }; @@ -22,14 +29,6 @@ let zathura_cb = callPackage ./cb { }; - zathuraWrapper = callPackage ./wrapper.nix { - plugins = [ - zathura_djvu - zathura_ps - zathura_cb - (if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler) - ]; - }; - }; -in -self + zathuraWrapper = callPackage ./wrapper.nix { }; + } +) diff --git a/pkgs/applications/misc/zathura/wrapper.nix b/pkgs/applications/misc/zathura/wrapper.nix index 5d60c48222123..4290fff26bcf6 100644 --- a/pkgs/applications/misc/zathura/wrapper.nix +++ b/pkgs/applications/misc/zathura/wrapper.nix @@ -3,8 +3,19 @@ lib, makeWrapper, zathura_core, + zathura_djvu, + zathura_ps, + zathura_cb, + zathura_pdf_mupdf, + zathura_pdf_poppler, file, - plugins ? [ ], + useMupdf, + plugins ? [ + zathura_djvu + zathura_ps + zathura_cb + (if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler) + ], }: symlinkJoin { name = "zathura-with-plugins-${zathura_core.version}"; |