mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 18:28:37 +02:00
Splits everything that depends on a `pkgs` instance into an optional attrs, allowing `helpers.nix` to be bootstrapped without `pkgs`. This required some refactoring: - `modules.specialArgs` is only available when `pkgs` is used - `modules.specialArgsWith` now requires `defaultPkgs` be provided - `builders.*` now have `*With` variants that take `pkgs` as an argument and a `withPkgs` function that returns the old interface - Had to define the fixed part of `builders` outside the attrs for now, to avoid infinite recursion. - The old `builders` are now deprecated, and print a warning when evaluated - `withOptoinalFns` was introduced to merge the optional attrs into the final lib.
60 lines
1.7 KiB
Nix
60 lines
1.7 KiB
Nix
{ self, ... }:
|
|
{
|
|
perSystem =
|
|
{
|
|
pkgs,
|
|
pkgsUnfree,
|
|
system,
|
|
helpers,
|
|
makeNixvimWithModule,
|
|
...
|
|
}:
|
|
let
|
|
evaluatedNixvim = helpers.modules.evalNixvim {
|
|
extraSpecialArgs = {
|
|
defaultPkgs = pkgs;
|
|
};
|
|
check = false;
|
|
};
|
|
in
|
|
{
|
|
checks = {
|
|
extra-args-tests = import ../tests/extra-args.nix {
|
|
inherit pkgs;
|
|
inherit makeNixvimWithModule;
|
|
};
|
|
|
|
extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };
|
|
|
|
extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; };
|
|
|
|
enable-except-in-tests = import ../tests/enable-except-in-tests.nix {
|
|
inherit pkgs makeNixvimWithModule;
|
|
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
|
|
};
|
|
|
|
failing-tests = pkgs.callPackage ../tests/failing-tests.nix {
|
|
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
|
|
};
|
|
|
|
no-flake = import ../tests/no-flake.nix {
|
|
inherit system;
|
|
inherit (self.lib.${system}.check) mkTestDerivationFromNvim;
|
|
nixvim = "${self}";
|
|
};
|
|
|
|
lib-tests = import ../tests/lib-tests.nix {
|
|
inherit pkgs helpers;
|
|
inherit (pkgs) lib;
|
|
};
|
|
|
|
maintainers = import ../tests/maintainers.nix { inherit pkgs; };
|
|
|
|
plugins-by-name = pkgs.callPackage ../tests/plugins-by-name.nix { inherit evaluatedNixvim; };
|
|
|
|
generated = pkgs.callPackage ../tests/generated.nix { };
|
|
|
|
package-options = pkgs.callPackage ../tests/package-options.nix { inherit evaluatedNixvim; };
|
|
} // import ../tests { inherit pkgs pkgsUnfree helpers; };
|
|
};
|
|
}
|