From 4d8285ac0cee38da19cf085ec5340e0a90c5276f Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 2 Mar 2024 22:48:56 +0100 Subject: [PATCH] plugins/ledger: add option to install the ledger binary --- plugins/languages/ledger.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/languages/ledger.nix b/plugins/languages/ledger.nix index 7b565dd0ba..91b0bd4fcd 100644 --- a/plugins/languages/ledger.nix +++ b/plugins/languages/ledger.nix @@ -34,6 +34,21 @@ with helpers.vim-plugin; ) ]; + extraOptions = { + ledgerPackage = mkOption { + type = with types; nullOr package; + default = pkgs.ledger; + description = '' + The package to install for `ledger`. + Set to `null` for disabling installation. + ''; + }; + }; + + extraConfig = cfg: { + extraPackages = optional (cfg.ledgerPackage != null) cfg.ledgerPackage; + }; + settingsOptions = { bin = helpers.mkNullOrStr '' Path to the `ledger` executable.