-
Notifications
You must be signed in to change notification settings - Fork 495
Expand file tree
/
Copy pathstandardml.nix
More file actions
37 lines (32 loc) · 904 Bytes
/
standardml.nix
File metadata and controls
37 lines (32 loc) · 904 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
{ pkgs, config, lib, ... }:
let
cfg = config.languages.standardml;
in
{
options.languages.standardml = {
enable = lib.mkEnableOption "tools for Standard ML development";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.mlton;
defaultText = lib.literalExpression "pkgs.mlton";
description = ''
The Standard ML package to use.
'';
};
lsp = {
enable = lib.mkEnableOption "Standard ML Language Server" // { default = true; };
package = lib.mkOption {
type = lib.types.package;
default = pkgs.millet;
defaultText = lib.literalExpression "pkgs.millet";
description = "The Standard ML language server package to use.";
};
};
};
config = lib.mkIf cfg.enable {
packages = [
cfg.package
pkgs.smlfmt
] ++ lib.optional cfg.lsp.enable cfg.lsp.package;
};
}