Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f43086caa9e6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b602b5c06710
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Aug 28, 2019

  1. Copy the full SHA
    0c4cb4c View commit details
  2. Merge pull request #67634 from mmahut/prometheus-cups-exporter

    prometheus-cups-exporter: init at unstable-2019-03-17
    WilliButz authored Aug 28, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b602b5c View commit details
Showing with 37 additions and 0 deletions.
  1. +36 −0 pkgs/servers/monitoring/prometheus/cups-exporter.nix
  2. +1 −0 pkgs/top-level/all-packages.nix
36 changes: 36 additions & 0 deletions pkgs/servers/monitoring/prometheus/cups-exporter.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ lib, fetchFromGitHub, python3Packages }:

python3Packages.buildPythonApplication rec {
pname = "prometheus-cups-exporter-unstable";
version = "2019-03-17";

format = "other";

src = fetchFromGitHub {
owner = "ThoreKr";
repo = "cups_exporter";
rev = "8fd1c2517e9878b7b7c73a450e5e546f437954a9";
sha256 = "1cwk2gbw2svqjlzgwv5wqzhq7fxwrwsrr0kkbnqn4mfb0kq6pa8m";
};

propagatedBuildInputs = with python3Packages; [ prometheus_client pycups ];

installPhase = ''
mkdir -p $out/share/
cp cups_exporter.py $out/share/
'';

fixupPhase = ''
makeWrapper "${python3Packages.python.interpreter}" "$out/bin/prometheus-cups-exporter" \
--set PYTHONPATH "$PYTHONPATH" \
--add-flags "$out/share/cups_exporter.py"
'';

meta = with lib; {
description = "A simple prometheus exporter for cups implemented in python";
homepage = "https://github.com/ThoreKr/cups_exporter";
license = licenses.unfree;
maintainers = [ maintainers.mmahut ];
platforms = platforms.all;
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -15019,6 +15019,7 @@ in
prometheus-bind-exporter = callPackage ../servers/monitoring/prometheus/bind-exporter.nix { };
prometheus-blackbox-exporter = callPackage ../servers/monitoring/prometheus/blackbox-exporter.nix { };
prometheus-collectd-exporter = callPackage ../servers/monitoring/prometheus/collectd-exporter.nix { };
prometheus-cups-exporter = callPackage ../servers/monitoring/prometheus/cups-exporter.nix { };
prometheus-consul-exporter = callPackage ../servers/monitoring/prometheus/consul-exporter.nix { };
prometheus-dnsmasq-exporter = callPackage ../servers/monitoring/prometheus/dnsmasq-exporter.nix { };
prometheus-dovecot-exporter = callPackage ../servers/monitoring/prometheus/dovecot-exporter.nix { };