unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#54068] [PATCH] Add xmrig and p2pool
@ 2022-02-19 23:12 Justin Veilleux
  2022-02-20 10:14 ` Maxime Devos
  2022-02-20 10:17 ` Maxime Devos
  0 siblings, 2 replies; 12+ messages in thread
From: Justin Veilleux @ 2022-02-19 23:12 UTC (permalink / raw)
  To: 54068

[-- Attachment #1: Type: text/plain, Size: 125 bytes --]

Here are two patches to add, respectively, the xmrig monero mining 
software and p2pool, a decentralized mining pool.

Cheers

[-- Attachment #2: 0002-gnu-Add-p2pool.patch --]
[-- Type: text/x-patch, Size: 2406 bytes --]

From 912cc0657b3de6eca9771f11b6bdade0fa24ddcc Mon Sep 17 00:00:00 2001
From: terramorpha <terramorpha@cock.li>
Date: Sat, 19 Feb 2022 18:07:42 -0500
Subject: [PATCH 2/2] gnu: Add p2pool.

* gnu/packages/finance.scm (p2pool): New variable.
---
 gnu/packages/finance.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 6d4e71ee24..ae344f010c 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -82,6 +82,7 @@ (define-module (gnu packages finance)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages gsasl)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages haskell-check)
   #:use-module (gnu packages haskell-web)
@@ -897,6 +898,41 @@ (define-public xmrig
 and RandomX benchmark.")
     (license license:gpl3)))
 
+(define-public p2pool
+  (package
+    (name "p2pool")
+    (version "1.7")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/SChernykh/p2pool")
+             (commit (string-append "v" version))
+             (recursive? #t)))
+       (sha256 (base32 "0jxl7j8x4nc65c8mdilifqy1gz1881g3qmmi48wvpciv8pbw45x2"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      ;; There are no tests.
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-p2pool
+            ;; The 'install' target forgets to install the binary
+            (lambda* (#:key outputs #:allow-other-keys)
+              (use-modules (guix build utils))
+              (install-file "p2pool" (string-append (assoc-ref outputs "out") "/bin"))
+              #t)))))
+    (inputs
+     (list libuv zeromq gss))
+    (home-page "https://p2pool.io/")
+    (synopsis "Decentralized Monero mining pool")
+    (description "Monero P2Pool is a peer-to-peer Monero mining pool.  P2Pool
+combines the advantages of pool and solo mining; you still fully control your
+Monero node and what it mines, but you get frequent payouts like on a regular
+pool.")
+    (license license:gpl3)))
+
 (define-public python-trezor-agent
   ;; It is called 'libagent' in pypi; i.e. this is the library as opposed to
   ;; the toplevel app called trezor-agent.
-- 
2.34.0


[-- Attachment #3: 0001-gnu-Add-xmrig.patch --]
[-- Type: text/x-patch, Size: 2637 bytes --]

From 13e1d1b98f105b7c9d24735f7d05a6ec8b6b8e0b Mon Sep 17 00:00:00 2001
From: terramorpha <terramorpha@cock.li>
Date: Sat, 19 Feb 2022 14:34:50 -0500
Subject: [PATCH 1/2] gnu: Add xmrig.

* gnu/packages/finance.scm (xmrig): New variable.
---
 gnu/packages/finance.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 985eaa87f7..6d4e71ee24 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -26,6 +26,7 @@
 ;;; Copyright © 2021 François J <francois-oss@avalenn.eu>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -93,6 +94,7 @@ (define-module (gnu packages finance)
   #: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)
@@ -857,6 +859,44 @@ (define-public monero-gui
 the Monero GUI client.")
     (license license:bsd-3)))
 
+(define-public xmrig
+  (package
+    (name "xmrig")
+    (version "6.16.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/xmrig/xmrig")
+         (commit (string-append "v" version))))
+       (sha256 (base32 "0mp7q14pfbdjvjai6nw6psqakr1hnzkkn4c51iw578866n2lmxw5"))))
+    (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 outputs #:allow-other-keys)
+              (use-modules (guix build utils))
+              (install-file "xmrig" (string-append (assoc-ref outputs "out") "/bin"))
+              #t)))))
+    (home-page "https://xmrig.com/")
+    (synopsis "XMR miner")
+    (description
+     "XMRig is a high performance, open source, cross platform
+RandomX, KawPow, CryptoNight, AstroBWT and GhostRider unified CPU/GPU miner
+and RandomX benchmark.")
+    (license license:gpl3)))
+
 (define-public python-trezor-agent
   ;; It is called 'libagent' in pypi; i.e. this is the library as opposed to
   ;; the toplevel app called trezor-agent.
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-08-12 15:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-19 23:12 [bug#54068] [PATCH] Add xmrig and p2pool Justin Veilleux
2022-02-20 10:14 ` Maxime Devos
2022-02-20 10:17 ` Maxime Devos
2022-04-05 14:05   ` Ludovic Courtès
2022-04-05 18:57     ` Justin Veilleux
2022-04-06 10:29       ` Maxime Devos
2022-04-06 15:33         ` Justin Veilleux
2022-04-06 18:24           ` Maxime Devos
2022-04-06 19:46             ` Justin Veilleux
2022-04-06 19:53             ` Justin Veilleux
2022-08-12 15:45               ` bug#54068: " Guillaume Le Vaillant
2022-04-06  0:51     ` [bug#54068] " Justin Veilleux

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).