zathuraPkgs: turn into scope, and other small cleanups (#325226)

This commit is contained in:
Franz Pletz
2024-09-28 15:19:20 +02:00
committed by GitHub
2 changed files with 27 additions and 17 deletions
+15 -16
View File
@@ -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 { };
}
)
+12 -1
View File
@@ -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}";