Subject: [PATCH v2 1/2] gnu: xmrig: Run 'guix style' over the package.

From: Ahmad Draidi <[email-masked]>
Date: Sun, 21 May 2023 09:48:37 +0400

* gnu/packages/finance.scm (xmrig): Restyle.
---
 gnu/packages/finance.scm | 61 ++++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 559b22257b..71d80bd081 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -2266,44 +2266,39 @@ (define-public xmrig
   (package
     (name "xmrig")
     (version "6.19.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/xmrig/xmrig")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256 (base32 "10vaq6ld4sddnpmv9dg71fjvw1jrfaddrp3bq6p3dxhsl153khm4"))
-       (modules '((guix build utils)))
-       (snippet
-        ;; TODO: Try to use system libraries instead of bundled ones in
-        ;; "src/3rdparty/". It requires changes to some "cmake/..." scripts
-        ;; and to some source files.
-        #~(begin
-            (delete-file-recursively "src/3rdparty/hwloc")
-            (substitute* "src/donate.h"
-              (("constexpr const int kDefaultDonateLevel = 1;")
-               "constexpr const int kDefaultDonateLevel = 0;")
-              (("constexpr const int kMinimumDonateLevel = 1;")
-               "constexpr const int kMinimumDonateLevel = 0;"))))))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/xmrig/xmrig")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "10vaq6ld4sddnpmv9dg71fjvw1jrfaddrp3bq6p3dxhsl153khm4"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; TODO: Try to use system libraries instead of bundled ones in
+               ;; "src/3rdparty/". It requires changes to some "cmake/..." scripts
+               ;; and to some source files.
+               #~(begin
+                   (delete-file-recursively "src/3rdparty/hwloc")
+                   (substitute* "src/donate.h"
+                     (("constexpr const int kDefaultDonateLevel = 1;")
+                      "constexpr const int kDefaultDonateLevel = 0;")
+                     (("constexpr const int kMinimumDonateLevel = 1;")
+                      "constexpr const int kMinimumDonateLevel = 0;"))))))
     (build-system cmake-build-system)
-    (inputs
-     (list
-      `(,hwloc "lib")
-      libuv
-      openssl))
+    (inputs (list `(,hwloc "lib") libuv openssl))
     (arguments
      (list
       ;; There are no tests.
       #:tests? #f
-      #:phases
-      #~(modify-phases
-         %standard-phases
-         (replace 'install
-           ;; There is no 'install' target, we must install xmrig manually
-           (lambda* (#:key #:allow-other-keys)
-             (install-file "xmrig"
-                           (string-append #$output "/bin")))))))
+      #:phases #~(modify-phases %standard-phases
+                   (replace 'install
+                     ;; There is no 'install' target, we must install xmrig manually
+                     (lambda* (#:key #:allow-other-keys)
+                       (install-file "xmrig"
+                                     (string-append #$output "/bin")))))))
     (home-page "https://xmrig.com/")
     (synopsis "Monero miner")
     (description
-- 
2.40.1