From 49c6fcbf3ccd6c24f4cf4a4ec73e26df3986f01d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 30 Jul 2015 15:49:29 -0400 Subject: [PATCH] gnu: Add graphios. * gnu/packages/python.scm (graphios): New variable. --- gnu/packages/python.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9d83e9a..5fcc2ae 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4297,3 +4297,43 @@ complexity of Python source code.") (define-public python2-flake8 (package-with-python2 python-flake8)) + +(define-public graphios + (package + (name "graphios") + (version "2.0.3") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/g/graphios/graphios-" + version ".tar.gz")) + (sha256 + (base32 + "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i")))) + (build-system python-build-system) + (arguments + ;; Be warned: Building with Python 3 succeeds, but the build process + ;; throws a syntax error that is ignored. + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-before 'build 'fix-setup.py + (lambda* (#:key outputs #:allow-other-keys) + ;; Fix hardcoded, unprefixed file names. + (let ((out (assoc-ref outputs "out"))) + (substitute* '("setup.py") + (("/etc") (string-append out "/etc")) + (("/usr") out) + (("distro_ver = .*") "distro_ver = ''")) + #t)))))) + (inputs + `(("python-setuptools" ,python2-setuptools))) + (home-page "https://github.com/shawn-sterling/graphios") + (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato") + (description + "Graphios is a script to emit nagios perfdata to various upstream metrics +processing and time-series systems. It's currently compatible with Graphite, +Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number +of supported upstream metrics systems simultaneously.") + (license gpl2+))) -- 2.4.3