From bc6c01202c11960a664b2447f2276a3393e71271 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Thu, 19 May 2022 23:18:30 +0200 Subject: [PATCH] support for systemd-notify mode + nix dependencies build by bundix --- Gemfile | 1 + gemset.nix | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ shell.nix | 13 +++++++++++ 3 files changed, 77 insertions(+) create mode 100644 gemset.nix create mode 100644 shell.nix diff --git a/Gemfile b/Gemfile index 56d11a9..5f05e92 100644 --- a/Gemfile +++ b/Gemfile @@ -4,3 +4,4 @@ gem 'net-dns' gem 'prometheus-client' gem 'rack' gem 'puma' +gem 'sd_notify' diff --git a/gemset.nix b/gemset.nix new file mode 100644 index 0000000..0840cdd --- /dev/null +++ b/gemset.nix @@ -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"; + }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..632adb4 --- /dev/null +++ b/shell.nix @@ -0,0 +1,13 @@ +with (import {}); +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 ]; +}