blob: 3a1dfefe98abaeea844881c1b02d7a09de69feab (
plain)
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
|
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.coq;
coqBuildInputs = (with cfg.coqPackages; [ coq ])
++ (cfg.packages cfg.coqPackages);
in {
options.coq = {
enable = mkEnableOption { name = "coq"; };
coqPackages = mkOption {
type = types.lazyAttrsOf types.package;
default = pkgs.coqPackages;
defaultText = literalExample "pkgs.coqPackages";
description = ''
The set of Coq packages from which to get Coq and its packages.
Use this option to set the version of Coq.
'';
};
packages = mkOption {
type = with types; functionTo (listOf package);
default = _: [ ];
defaultText = literalExample "_: [ ]";
description = ''
Coq packages that will be made available to the environment.
'';
example = literalExample ''
coqPackages: with coqPackages; [ autosubst ];
'';
};
};
config = mkIf cfg.enable {
buildInputs = coqBuildInputs;
};
}
|