diff mbox series

[bug#54539,2/6] gnu: xsensors: Move to (gnu packages xorg) to break cycles.

Message ID 20220323184855.25241-2-maximedevos@telenet.be
State New
Headers show
Series Start breaking up import cycles | expand

Commit Message

M March 23, 2022, 6:48 p.m. UTC
This partially breaks a cycle between (gnu packages linux) and
(gnu packages gtk).  It is not sufficient though, see next patch.

* gnu/packages/linux.scm (xensors): Move to ...
* gnu/packages/xorg.scm: ... this module.
---
 gnu/packages/linux.scm | 38 --------------------------------------
 gnu/packages/xorg.scm  | 41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 38 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 8d9dc01839..dc4f91d48f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4502,44 +4502,6 @@  SMBus access.")
         #~(list (string-append "prefix=" #$output)
                 (string-append "CC=" #$(cc-for-target))))))))
 
-(define-public xsensors
-  (package
-    (name "xsensors")
-    (version "0.70")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "http://www.linuxhardware.org/xsensors/xsensors-"
-                    version ".tar.gz"))
-              (sha256
-               (base32
-                "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
-    (build-system gnu-build-system)
-    (inputs `(("lm-sensors" ,lm-sensors "lib")
-              ("gtk" ,gtk+-2)))
-    (native-inputs (list pkg-config))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'enable-deprecated
-           (lambda _
-             (substitute* "src/Makefile.in"
-               (("-DGDK_DISABLE_DEPRECATED") "")
-               (("-DGTK_DISABLE_DEPRECATED") ""))
-             #t))
-         (add-before 'configure 'remove-Werror
-           (lambda _
-             (substitute* '("configure" "src/Makefile.in")
-               (("-Werror") ""))
-             #t)))))
-    (home-page "http://www.linuxhardware.org/xsensors/")
-    (synopsis "Hardware health information viewer")
-    (description
-     "Xsensors reads data from the libsensors library regarding hardware
-health such as temperature, voltage and fan speed and displays the information
-in a digital read-out.")
-    (license license:gpl2+)))
-
 (define-public perf
   (package
     (name "perf")
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 14cd3bc789..7e905842be 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -10,6 +10,7 @@ 
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
+;;; Copyright © 2017 Dave Love <fx@gnu.org>
 ;;; Copyright © 2016, 2017 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
@@ -6131,6 +6132,46 @@  on a button to dismiss it or can select one of several buttons
 to answer a question.  Xmessage can also exit after a specified time.")
     (license license:x11)))
 
+;; Don't put this in (gnu packages linux) because that would create a
+;; cycle between (gnu packages linux) and (gnu packages gtk).
+(define-public xsensors
+  (package
+    (name "xsensors")
+    (version "0.70")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://www.linuxhardware.org/xsensors/xsensors-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
+    (build-system gnu-build-system)
+    (inputs `(("lm-sensors" ,lm-sensors "lib")
+              ("gtk" ,gtk+-2)))
+    (native-inputs (list pkg-config))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'enable-deprecated
+           (lambda _
+             (substitute* "src/Makefile.in"
+               (("-DGDK_DISABLE_DEPRECATED") "")
+               (("-DGTK_DISABLE_DEPRECATED") ""))
+             #t))
+         (add-before 'configure 'remove-Werror
+           (lambda _
+             (substitute* '("configure" "src/Makefile.in")
+               (("-Werror") ""))
+             #t)))))
+    (home-page "http://www.linuxhardware.org/xsensors/")
+    (synopsis "Hardware health information viewer")
+    (description
+     "Xsensors reads data from the libsensors library regarding hardware
+health such as temperature, voltage and fan speed and displays the information
+in a digital read-out.")
+    (license license:gpl2+)))
+
 (define-public xterm
   (package
     (name "xterm")