From patchwork Sat Feb 13 15:26:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 27035 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 947A927BC2E; Sat, 13 Feb 2021 15:27:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 54FD227BC27 for ; Sat, 13 Feb 2021 15:27:18 +0000 (GMT) Received: from localhost ([::1]:41058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAwpJ-00009Z-Ca for patchwork@mira.cbaines.net; Sat, 13 Feb 2021 10:27:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAwp6-00009Q-1w for guix-patches@gnu.org; Sat, 13 Feb 2021 10:27:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAwp5-00083T-Ai for guix-patches@gnu.org; Sat, 13 Feb 2021 10:27:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lAwp4-0005dL-Ll for guix-patches@gnu.org; Sat, 13 Feb 2021 10:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46490] [PATCH] gnu: Add temper-exporter. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Feb 2021 15:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46490 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46490@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161323000921634 (code B ref -1); Sat, 13 Feb 2021 15:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Feb 2021 15:26:49 +0000 Received: from localhost ([127.0.0.1]:34850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAwoq-0005cs-Ty for submit@debbugs.gnu.org; Sat, 13 Feb 2021 10:26:49 -0500 Received: from lists.gnu.org ([209.51.188.17]:42670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAwon-0005cj-Ri for submit@debbugs.gnu.org; Sat, 13 Feb 2021 10:26:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAwon-000098-Lp for guix-patches@gnu.org; Sat, 13 Feb 2021 10:26:45 -0500 Received: from mira.cbaines.net ([212.71.252.8]:50378) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAwol-0007tr-7L for guix-patches@gnu.org; Sat, 13 Feb 2021 10:26:45 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id C28F627BC27 for ; Sat, 13 Feb 2021 15:26:41 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 87ae0d23 for ; Sat, 13 Feb 2021 15:26:40 +0000 (UTC) From: Christopher Baines Date: Sat, 13 Feb 2021 15:26:40 +0000 Message-Id: <20210213152640.29564-1-mail@cbaines.net> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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")