diff --git a/docs/default.nix b/docs/default.nix index 2a741c72..043e1c20 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -1,4 +1,6 @@ -{ getHelpers, pkgs }: +{ + pkgs ? import { config.enableUnfree = true; }, +}: let # Extend nixpkg's lib, so that we can handle recursive leaf types such as `either` lib = pkgs.lib.extend ( @@ -32,7 +34,10 @@ let inherit lib; }; - helpers = getHelpers pkgsDoc false; + helpers = import ../lib/helpers.nix { + inherit lib; + pkgs = pkgsDoc; + }; nixvimPath = toString ./..; diff --git a/flake-modules/helpers.nix b/flake-modules/helpers.nix index 69c70ff1..b7ec897b 100644 --- a/flake-modules/helpers.nix +++ b/flake-modules/helpers.nix @@ -1,15 +1,7 @@ -{ getHelpers, ... }: { - _module.args.getHelpers = - pkgs: _nixvimTests: - import ../lib/helpers.nix { - inherit pkgs _nixvimTests; - inherit (pkgs) lib; - }; - perSystem = - { pkgs, config, ... }: + { pkgs, ... }: { - _module.args.helpers = getHelpers pkgs false; + _module.args.helpers = import ../lib/helpers.nix { inherit pkgs; }; }; } diff --git a/flake-modules/packages.nix b/flake-modules/packages.nix index 51d27a6d..e25d9ac7 100644 --- a/flake-modules/packages.nix +++ b/flake-modules/packages.nix @@ -1,10 +1,8 @@ -{ getHelpers, ... }: { perSystem = { pkgsUnfree, config, ... }: { packages = import ../docs { - inherit getHelpers; # Building the docs evaluates each plugin's default package, some of which are unfree pkgs = pkgsUnfree; };