collectd-{,master}: init
This commit is contained in:
parent
429bde6218
commit
fd2f4bf216
|
@ -0,0 +1,17 @@
|
|||
let
|
||||
overlay = self: super: {
|
||||
collectd = super.collectd.overrideAttrs (_: rec {
|
||||
name = "collectd-${version}";
|
||||
src = <collectd>;
|
||||
version = "unstable";
|
||||
patches = [];
|
||||
});
|
||||
};
|
||||
in
|
||||
import ./collectd.nix {
|
||||
pkgs = (
|
||||
import <nixpkgs> {
|
||||
overlays = [ overlay ];
|
||||
}
|
||||
);
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
{ pkgs ? import <nixpkgs> {},
|
||||
...
|
||||
}:
|
||||
|
||||
with pkgs;
|
||||
|
||||
let
|
||||
collectdMakefileAm =
|
||||
stdenv.mkDerivation {
|
||||
name = "collectd-Makefile.am-BUILD_PLUGINs";
|
||||
src = pkgs.collectd.src;
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
installPhase = "grep BUILD_PLUGIN Makefile.am > $out";
|
||||
};
|
||||
plugins =
|
||||
let
|
||||
findPlugins = s:
|
||||
let
|
||||
m = builtins.match ".*BUILD_PLUGIN_([A-Z0-9_]+)([.$\n]*)" s;
|
||||
plugin = lib.toLower (builtins.elemAt m 0);
|
||||
rest = builtins.elemAt m 1;
|
||||
in if m == null
|
||||
then []
|
||||
else [plugin] ++ (findPlugins rest);
|
||||
in
|
||||
builtins.concatMap findPlugins (
|
||||
lib.splitString "\n" (
|
||||
builtins.readFile collectdMakefileAm
|
||||
)
|
||||
);
|
||||
in
|
||||
builtins.listToAttrs (
|
||||
map (plugin: {
|
||||
name = "collectd-plugin-${plugin}";
|
||||
value = lib.hydraJob (pkgs.collectd.override {
|
||||
enabledPlugins = [ plugin ];
|
||||
});
|
||||
}) plugins
|
||||
)
|
17
jobsets.nix
17
jobsets.nix
|
@ -148,6 +148,23 @@ let
|
|||
wikidata-query-rdf = "https://git.gra.one/graviola/wikidata/wikidata-query-rdf.git";
|
||||
};
|
||||
};
|
||||
|
||||
collectd = mkJobset {
|
||||
description = "Test dependencies for each collectd plugin";
|
||||
nixexprpath = "collectd.nix";
|
||||
gitUrls = {
|
||||
nixpkgs = "https://github.com/NixOS/nixpkgs.git nixos-unstable";
|
||||
};
|
||||
};
|
||||
|
||||
collectd-master = mkJobset {
|
||||
description = "Test dependencies for each collectd plugin";
|
||||
nixexprpath = "collectd-master.nix";
|
||||
gitUrls = {
|
||||
collectd = "https://git.octo.it/collectd.git";
|
||||
nixpkgs = "https://github.com/NixOS/nixpkgs.git nixos-unstable";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
jobsetsJson = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets );
|
||||
|
|
Loading…
Reference in New Issue