blob: e31721ab25a5e98dcba645a0aa9c2d5f3fc9251a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.golang;
in {
options.golang = {
enable = mkEnableOption { name = "golang"; };
package = mkOption {
type = types.package;
default = pkgs.go;
defaultText = literalExample "pkgs.go";
description = ''
The package for Go. This sets the version of Go..
'';
example = literalExample "pkgs.go_1_15";
};
};
config = mkIf cfg.enable {
buildInputs = [ cfg.package ] ++ (with pkgs; [ gocode gofumpt golint ]);
};
}
|