2025-01-30 18:56:32 -07:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
2025-02-10 15:24:39 -07:00
|
|
|
} @ moduleInheritancePackage: let
|
2025-01-30 18:56:32 -07:00
|
|
|
# The name of the pdf viewer
|
|
|
|
|
name = "qpdfview";
|
|
|
|
|
|
|
|
|
|
# The viewer template
|
|
|
|
|
template = import ./viewerTemplate.nix;
|
|
|
|
|
|
2025-02-11 21:14:24 -07:00
|
|
|
inherit (lib.options) mkOption mkEnableOption mkPackageOption;
|
|
|
|
|
inherit (lib.types) str listOf;
|
2025-01-30 18:56:32 -07:00
|
|
|
in (
|
|
|
|
|
template {
|
2025-02-10 15:24:39 -07:00
|
|
|
inherit name moduleInheritancePackage;
|
2025-01-30 18:56:32 -07:00
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
enable = mkEnableOption "enable qpdfview as the pdf file previewer.";
|
|
|
|
|
|
2025-02-11 21:14:24 -07:00
|
|
|
package = mkPackageOption pkgs "qpdfview" {};
|
2025-01-30 18:56:32 -07:00
|
|
|
|
|
|
|
|
executable = mkOption {
|
|
|
|
|
type = str;
|
|
|
|
|
default = "qpdfview";
|
|
|
|
|
description = "The executable name to call the viewer.";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
args = mkOption {
|
|
|
|
|
type = listOf str;
|
2025-02-11 21:14:24 -07:00
|
|
|
default = [
|
|
|
|
|
"--unique"
|
|
|
|
|
"%p#src:%f:%l:1"
|
|
|
|
|
];
|
2025-01-30 18:56:32 -07:00
|
|
|
description = "Arguments to pass to the viewer.";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
argsFunction = viewerCfg: (viewerCfg.args);
|
|
|
|
|
}
|
|
|
|
|
)
|