support for systemd-notify mode + nix dependencies build by bundix

This commit is contained in:
Denis Knauf 2022-05-19 23:18:30 +02:00
parent 10af112b04
commit bc6c01202c
3 changed files with 77 additions and 0 deletions

View file

@ -4,3 +4,4 @@ gem 'net-dns'
gem 'prometheus-client'
gem 'rack'
gem 'puma'
gem 'sd_notify'

63
gemset.nix Normal file
View file

@ -0,0 +1,63 @@
{
net-dns = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "18d97xjphw21naaqfhgxp95ikr1d79rx708b2df3xm01j6isqy1d";
type = "gem";
};
version = "0.9.0";
};
nio4r = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0xk64wghkscs6bv2n22853k2nh39d131c6rfpnlw12mbjnnv9v1v";
type = "gem";
};
version = "2.5.8";
};
prometheus-client = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "11k1r8mfr0bnd574yy08wmpzbgq8yqw3shx7fn5f6hlmayacc4bh";
type = "gem";
};
version = "4.0.0";
};
puma = {
dependencies = ["nio4r"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dgr2rybayih2naz3658mbzqwfrg9fxl80zsvhscf6b972kp3jdw";
type = "gem";
};
version = "5.6.4";
};
rack = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0i5vs0dph9i5jn8dfc6aqd6njcafmb20rwqngrf759c9cvmyff16";
type = "gem";
};
version = "2.2.3";
};
sd_notify = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0c9imnjbakx25r2n7widfp00s19ndzmmwax761mx5vbwm9nariyb";
type = "gem";
};
version = "0.1.1";
};
}

13
shell.nix Normal file
View file

@ -0,0 +1,13 @@
with (import <nixpkgs> {});
let
env = bundlerEnv {
name = "dnsbl_exporter-bundler-env";
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in stdenv.mkDerivation {
name = "dnsbl_exporter";
buildInputs = [ pkgs.ruby env env.gems.puma ];
}