forked from nix-community/nixvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
39 lines (36 loc) · 1.01 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
makeNixvim,
makeNixvimWithModule,
lib,
helpers,
pkgs,
}:
let
fetchTests = import ./fetch-tests.nix;
test-derivation = import ./test-derivation.nix { inherit pkgs makeNixvim makeNixvimWithModule; };
inherit (test-derivation) mkTestDerivation;
# List of files containing configurations
testFiles = fetchTests {
inherit lib pkgs helpers;
root = ./test-sources;
};
exampleFiles = {
example =
let
config = import ../example.nix { inherit pkgs; };
in
builtins.removeAttrs config.programs.nixvim [
# This is not available to standalone modules, only HM & NixOS Modules
"enable"
# This is purely an example, it does not reflect a real usage
"extraConfigLua"
"extraConfigVim"
];
};
# We attempt to build & execute all configurations
derivationList = pkgs.lib.mapAttrsToList (name: path: {
inherit name;
path = mkTestDerivation name path;
}) (testFiles // exampleFiles);
in
pkgs.linkFarm "nixvim-tests" derivationList