-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
60 lines (54 loc) · 1.34 KB
/
Copy pathdefault.nix
File metadata and controls
60 lines (54 loc) · 1.34 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
self ? import ./nix/utils/import-flake.nix { src = ./.; },
inputs ? self.inputs,
system ? builtins.currentSystem,
pkgs ? import inputs.nixpkgs {
config = { };
overlays = [ ];
inherit system;
},
lib ? import "${inputs.nixpkgs}/lib",
}:
let
scope = lib.makeScope pkgs.newScope (sc: {
inherit
lib
pkgs
self
system
inputs
;
# Custom library. Contains helper functions, builders, ...
devLib = sc.callPackage ./nix/lib.nix { };
# Wrappers library
wlib = inputs.wrappers.lib;
format = sc.callPackage ./nix/formatter.nix { };
devShells.default = pkgs.mkShellNoCC {
packages = [
sc.format.formatter
];
};
neovimWrapper = sc.callPackage ./nix/wrapper { };
devPkgs = {
# nix run .#default -- default.nix
default = sc.neovimWrapper.wrapper;
};
overlays.default = final: prev: {
neovim = sc.devPkgs.default;
};
flake.perSystem = {
devShells = sc.devShells;
formatter = sc.format.formatter;
packages = sc.devPkgs;
checks = lib.filterAttrs (_: v: !v.meta.broken or false) sc.flake.perSystem.packages;
legacyPackages = {
lib = sc.devLib;
packages = sc.devPkgs;
};
};
flake.system-agnostic = {
inherit (sc) overlays;
};
});
in
scope // scope.devPkgs