-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
47 lines (45 loc) · 1.34 KB
/
flake.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
40
41
42
43
44
45
46
47
{
description = "mkShell meets modules";
inputs = {
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
};
outputs = _: {
flakeModule = builtins.trace "[1;31mUse `flakeModules.default` instead of `flakeModule`[0" ./flake-module.nix;
flakeModules.default = ./flake-module.nix;
overlays.default = final: prev: {
make-shell =
module:
(prev.lib.evalModules {
modules = [
./shell-modules/default.nix
{ config._module.args.pkgs = final; }
module
];
}).config.finalPackage;
};
templates = {
default = {
description = "Example using the make-shell overlay";
path = builtins.path {
path = ./examples/flake;
filter = path: _: baseNameOf path == "flake.nix";
};
};
flake-parts = {
description = "Example using the make-shell flake module with flake-parts";
path = builtins.path {
path = ./examples/flake-parts;
filter = path: _: baseNameOf path == "flake.nix";
};
};
full = {
description = "Example demonstrating many make-shell features";
path = builtins.path {
path = ./examples/flake-parts;
filter = path: _: baseNameOf path == "flake.nix";
};
};
};
};
}