/
interface.nix
58 lines (58 loc) · 1.4 KB
/
interface.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
51
52
53
54
55
56
57
58
{
config,
options,
lib,
...
}: let
l = lib // builtins;
t = l.types;
cfg = config.php-composer-lock;
in {
options.php-composer-lock = l.mapAttrs (_: l.mkOption) {
dreamLock = {
type = t.attrs;
internal = true;
description = "The content of the dream2nix generated lock file";
};
composerJsonFile = {
type = t.path;
description = ''
The composer.json file to use.
'';
default = cfg.source + "/composer.json";
defaultText = ''
''${cfg.source}/composer.json
'';
};
composerJson = {
type = t.attrs;
description = "The content of the composer.json";
};
composerLockFile = {
type = t.nullOr t.path;
description = ''
The composer.lock file to use.
'';
default = cfg.source + "/composer.lock";
defaultText = ''
''${cfg.source}/composer.lock
'';
};
composerLock = {
type = t.attrs;
description = "The content of the composer.lock";
};
source = {
type = t.either t.path t.package;
description = "Source of the package";
};
withDevDependencies = {
type = t.bool;
default = true;
description = ''
Whether to include development dependencies.
Usually it's a bad idea to disable this, as development dependencies can contain important build time dependencies.
'';
};
};
}