3
0
Fork 0
forked from mirrors/nixpkgs

scollector: Update from 20150506172827 to 0.3.0

This commit is contained in:
Rickard Nilsson 2015-08-11 13:45:10 +02:00
parent 9f7cfea070
commit 3afc387b4a
2 changed files with 16 additions and 6 deletions

View file

@ -20,9 +20,11 @@ let
cfg.collectors)}
'';
cmdLineOpts = concatStringsSep " " (
[ "-h=${cfg.bosunHost}" "-c=${collectors}" ] ++ cfg.extraOpts
);
conf = pkgs.writeText "scollector.toml" ''
Host = "${cfg.bosunHost}"
ColDir = "${collectors}"
${cfg.extraConfig}
'';
in {
@ -92,6 +94,14 @@ in {
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra scollector configuration added to the end of scollector.toml
'';
};
};
};
@ -108,7 +118,7 @@ in {
PermissionsStartOnly = true;
User = cfg.user;
Group = cfg.group;
ExecStart = "${cfg.package}/bin/scollector ${cmdLineOpts}";
ExecStart = "${cfg.package}/bin/scollector -conf=${conf} ${lib.concatStringsSep " " cfg.extraOpts}";
};
};

View file

@ -3,14 +3,14 @@
with goPackages;
buildGoPackage rec {
rev = "20150506172827";
rev = "0.3.0";
name = "scollector-${rev}";
goPackagePath = "bosun.org";
src = fetchFromGitHub {
inherit rev;
owner = "bosun-monitor";
repo = "bosun";
sha256 = "0rnfiv9b835b8j8r9qh9j2mz9mm9q45vfg9cqa4nngrgfd0cqvl8";
sha256 = "05qfhm5ipdry0figa0rhmg93c45dzh2lwpia73pfxp64l1daqa3a";
};
subPackages = [ "cmd/scollector" ];