guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: gnu: Add xmrig.


From: guix-commits
Subject: 01/03: gnu: Add xmrig.
Date: Fri, 12 Aug 2022 11:44:35 -0400 (EDT)

glv pushed a commit to branch master
in repository guix.

commit ed4a3f17bf73d6a7e1d282924233498db79f7038
Author: Justin Veilleux <terramorpha@cock.li>
AuthorDate: Fri Aug 12 13:38:43 2022 +0200

    gnu: Add xmrig.
    
    * gnu/packages/finance.scm (xmrig): New variable.
    
    Co-authored-by: Guillaume Le Vaillant <glv@posteo.net>
---
 gnu/packages/finance.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index f73dc052ed..9a5b8b1c20 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -31,6 +31,7 @@
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
 ;;; Copyright © 2022 Collin J. Doering <collin@rekahsoft.ca>
+;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -100,6 +101,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
@@ -2114,3 +2116,59 @@ analysis of financial market data.")
 format used by SWIFT.  It returns smart Python collections for statistics
 and manipulation.")
     (license license:bsd-3)))
+
+(define-public xmrig
+  (package
+    (name "xmrig")
+    (version "6.18.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 "1ncnfjpjwjdv29plyiam2nh01bfni49sgfi3qkijygi1450w71dx"))
+       (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.
+        #~(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))
+    (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")))))))
+    (home-page "https://xmrig.com/";)
+    (synopsis "Monero miner")
+    (description
+     "XMRig is a high performance, cross platform RandomX, KawPow,
+CryptoNight, AstroBWT and GhostRider unified CPU/GPU miner and RandomX
+benchmark.
+
+Warning: upstream, by default, receives a percentage of the mining time.  This
+anti-functionality has been neutralised in Guix, but possibly not in all other
+distributions.
+
+Warning: this software, because of it's nature, has high energy consumption.
+Also, the energy expenses might be higher that the cryptocurrency gained by
+mining.")
+    (license license:gpl3+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]