diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus')
4 files changed, 16 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile index 9753a02ce094..54a39883d060 100644 --- a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile +++ b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile @@ -4,4 +4,4 @@ source "https://rubygems.org" # gem "rails" gem "webrick", "1.7.0" -gem "prometheus_exporter", File.read(File.expand_path("../prometheus_exporter_version", __FILE__)).strip +gem "prometheus_exporter", "2.0.6" diff --git a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile.lock b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile.lock index 25e4e031c01f..88a3a3c8d654 100644 --- a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile.lock +++ b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile.lock @@ -13,4 +13,4 @@ DEPENDENCIES webrick (= 1.7.0) BUNDLED WITH - 2.4.10 + 2.4.13 diff --git a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix index b5c2ef7c6e84..95bf4c5a679a 100644 --- a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix +++ b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix @@ -6,8 +6,8 @@ src = fetchFromGitHub { owner = "discourse"; repo = "discourse-prometheus"; - rev = "802cb5aa89838ecb3078dbe21b70d87b1675d89e"; - sha256 = "sha256-tgujK/k/7l/9dAFna5sfUpgP0PVfjk+aGRbqZ70lmRw="; + rev = "8a7a46a80cc65aa0839bc5e3c3b6f8ef6544089f"; + sha256 = "sha256-TL+pbP26LvRMKdy8CAuBEK+LZfAs8HfggMeUDaBu9hc="; }; patches = [ diff --git a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/spec-import-fix-abi-version.patch b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/spec-import-fix-abi-version.patch index 7b1159d0a800..de3a5c718f00 100644 --- a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/spec-import-fix-abi-version.patch +++ b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/spec-import-fix-abi-version.patch @@ -1,16 +1,20 @@ diff --git a/bin/collector b/bin/collector -index 4fec65e..e59eac7 100755 +index 6bd04a8caffb..119526fc6ea3 100644 --- a/bin/collector +++ b/bin/collector -@@ -3,8 +3,10 @@ +@@ -3,12 +3,14 @@ Process.setproctitle("discourse prometheus-collector") +# We need the ABI version {MAJOR}.{MINOR}.0 here. +abi_version = ENV['GEM_PATH'].split("/")[-1] - version = File.read(File.expand_path("../../prometheus_exporter_version", __FILE__)).strip --spec_file = File.expand_path("../../gems/#{RUBY_VERSION}/specifications/prometheus_exporter-#{version}.gemspec", __FILE__) -+spec_file = File.expand_path("../../gems/#{abi_version}/specifications/prometheus_exporter-#{version}.gemspec", __FILE__) - - spec = Gem::Specification.load spec_file - spec.activate + [ + "webrick-#{ENV["WEBRICK_VERSION"]}", + "prometheus_exporter-#{ENV["PROMETHEUS_EXPORTER_VERSION"]}", + ].each do |spec_name| + spec_file = +- File.expand_path("../../gems/#{RUBY_VERSION}/specifications/#{spec_name}.gemspec", __FILE__) ++ File.expand_path("../../gems/#{abi_version}/specifications/#{spec_name}.gemspec", __FILE__) + spec = Gem::Specification.load(spec_file) + spec.activate + end |