-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
50 lines (47 loc) · 1.38 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
48
49
50
{
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
emacs-builtins.url = "github:emacs-twist/emacs-builtins";
};
outputs = {flake-parts, ...} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} ({flake-parts-lib, ...}: let
inherit (flake-parts-lib) importApply;
flakeModules.default = importApply ./flake-module.nix {
inherit (inputs) emacs-builtins;
};
in {
systems = [];
flake = {
inherit flakeModules;
lib = {
/*
Generate `elisp-rice` flake output from inputs.
Example:
elisp-rice = inputs.elisp-rice.lib.configFromInputs {
inherit (inputs) rice-src rice-lock registries systems melpa;
};
*/
configFromInputs = {
rice-src,
rice-lock,
registries,
systems,
...
} @ inputs': let
cfg = rice-src.elisp-rice;
in {
localPackages = cfg.packages;
extraPackages = cfg.extraPackages or [];
tests = cfg.tests or {};
src = rice-src.outPath;
lockDir = rice-lock.outPath;
melpa = inputs'.melpa or null;
github = {
systems = import systems;
};
registries = registries.lib.registries;
};
};
};
});
}