From: Justin Veilleux <terramorpha@cock.li>
To: "Maxime Devos" <maximedevos@telenet.be>,
"Ludovic Courtès" <ludo@gnu.org>
Cc: 54068@debbugs.gnu.org
Subject: [bug#54068] [PATCH] Add xmrig and p2pool
Date: Wed, 6 Apr 2022 15:46:54 -0400 [thread overview]
Message-ID: <fd7a683c-7367-ce14-8f81-df165e119b3d@cock.li> (raw)
In-Reply-To: <172ba8211c961d060cb98166f9ff8fe6062b7ea9.camel@telenet.be>
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
You are right, this is simpler
Regarding the other distros and the automatic/minimum donation, I found
that most major distributions*
patch out the minimum donation level(but keep the default of 1%) and few
leave it unchanged.
*: https://repology.org/project/xmrig/versions
[-- Attachment #2: 0001-gnu-Add-xmrig.patch --]
[-- Type: text/x-patch, Size: 3342 bytes --]
From 0851821735fef3df3e1792644a8544af79a45e0f Mon Sep 17 00:00:00 2001
From: terramorpha <terramorpha@cock.li>
Date: Tue, 5 Apr 2022 20:46:35 -0400
Subject: [PATCH] gnu: Add xmrig.
* gnu/packages/finance.scm (xmrig): New variable.
---
gnu/packages/finance.scm | 57 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 9f2d055048..87727b987a 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)
@@ -1978,3 +1980,58 @@ (define-public python-mt-940
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.17.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/xmrig/xmrig")
+ (commit (string-append "v" version))))
+ (sha256 (base32 "11wh2ry3dnjynzc9a3nd8mfja7h6nxmx4fwaha82ssz5dkfqvj9b"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(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
+ #:modules '((guix build utils)
+ (guix build cmake-build-system))
+ #: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, open source, 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
+and will increase your carbon footprint. Also, the energy expenses might be
+higher that the cryptocurrency gained by mining.")
+ (license license:gpl3+)))
--
2.34.0
next prev parent reply other threads:[~2022-04-06 19:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd7a683c-7367-ce14-8f81-df165e119b3d@cock.li \
--to=terramorpha@cock.li \
--cc=54068@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.