-
Notifications
You must be signed in to change notification settings - Fork 155
Expand file tree
/
Copy pathmeson.nix
More file actions
45 lines (42 loc) · 791 Bytes
/
meson.nix
File metadata and controls
45 lines (42 loc) · 791 Bytes
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
{
config,
lib,
mkFormatterModule,
...
}:
let
cfg = config.programs.meson;
in
{
meta.maintainers = [ "RossSmyth" ];
imports = [
(mkFormatterModule {
name = "meson";
args = [
"fmt"
"-i"
];
includes = [
"meson.build"
"meson.options"
"meson_options.txt"
"*/meson.build"
"*/meson.options"
"*/meson_options.txt"
];
})
];
options.programs.meson = {
editorconfig = lib.mkOption {
description = ''
Try to read configuration from .editorconfig
'';
type = lib.types.bool;
example = true;
default = false;
};
};
config = lib.mkIf cfg.enable {
settings.formatter.meson.options = lib.optionals cfg.editorconfig [ "-e" ];
};
}