unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 46490@debbugs.gnu.org
Subject: [bug#46490] [PATCH] gnu: Add temper-exporter.
Date: Sat, 13 Feb 2021 15:26:40 +0000
Message-ID: <20210213152640.29564-1-mail@cbaines.net> (raw)

* gnu/packages/monitoring.scm (temper-exporter): New variable.
---
 gnu/packages/monitoring.scm | 47 +++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm
index 75a422921c..81e3d9c156 100644
--- a/gnu/packages/monitoring.scm
+++ b/gnu/packages/monitoring.scm
@@ -508,6 +508,53 @@ written in Go with pluggable metric collectors.")
     (home-page "https://github.com/prometheus/node_exporter")
     (license license:asl2.0)))
 
+(define-public temper-exporter
+  (let ((commit "a87bbab19c05609d62d9e4c7941178700c1ef84d")
+        (revision "0"))
+    (package
+      (name "temper-exporter")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/yrro/temper-exporter")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0jk3ydi8s14q5kyl9j3gm2zrnwlb1jwjqpg5vqrgkbm9jrldrabc"))))
+      (build-system python-build-system)
+      (arguments
+       '(#:tests? #f                    ; One test failure:
+                                        ; test/test_exporter.py:33:
+                                        ; AssertionError
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-setup.py
+             (lambda _
+               (substitute* "setup.py"
+                 (("git_ref = .*\n") "git_ref = ''\n"))
+               #t))
+           (add-after 'install 'install-udev-rules
+             (lambda* (#:key outputs #:allow-other-keys)
+               (install-file "debian/prometheus-temper-exporter.udev"
+                             (string-append (assoc-ref outputs "out")
+                                            "/lib/udev/rules.d"))
+               #t)))))
+      (inputs
+       `(("python-prometheus-client" ,python-prometheus-client)
+         ("python-pyudev" ,python-pyudev)))
+      (native-inputs
+       `(("python-pytest" ,python-pytest)
+         ("python-pytest-mock" ,python-pytest-mock)
+         ("python-pytest-runner" ,python-pytest-runner)))
+      (home-page "https://github.com/yrro/temper-exporter")
+      (synopsis "Prometheus exporter for PCSensor TEMPer sensor devices")
+      (description
+       "This package contains a Prometheus exporter for the TEMPer sensor
+devices.")
+      (license license:expat))))
+
 (define-public fswatch
   (package
     (name "fswatch")
-- 
2.30.0





             reply	other threads:[~2021-02-13 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13 15:26 Christopher Baines [this message]
2021-02-22 10:11 ` Ludovic Courtès
2021-02-22 22:22   ` bug#46490: " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210213152640.29564-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=46490@debbugs.gnu.org \
    --subject='Re: [bug#46490] [PATCH] gnu: Add temper-exporter.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git