From patchwork Wed Apr 6 19:46:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Justin Veilleux X-Patchwork-Id: 38369 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D90B727BBEA; Wed, 6 Apr 2022 20:48:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5F6B627BBE9 for ; Wed, 6 Apr 2022 20:48:22 +0100 (BST) Received: from localhost ([::1]:47126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncBdd-0008Ul-FT for patchwork@mira.cbaines.net; Wed, 06 Apr 2022 15:48:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncBdK-0008Ud-WA for guix-patches@gnu.org; Wed, 06 Apr 2022 15:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncBdK-0001CD-Me for guix-patches@gnu.org; Wed, 06 Apr 2022 15:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ncBdK-0003ia-Gn for guix-patches@gnu.org; Wed, 06 Apr 2022 15:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54068] [PATCH] Add xmrig and p2pool Resent-From: Justin Veilleux Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Apr 2022 19:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54068 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: Maxime Devos , Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 54068@debbugs.gnu.org Received: via spool by 54068-submit@debbugs.gnu.org id=B54068.164927443114081 (code B ref 54068); Wed, 06 Apr 2022 19:48:02 +0000 Received: (at 54068) by debbugs.gnu.org; 6 Apr 2022 19:47:11 +0000 Received: from localhost ([127.0.0.1]:59203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncBcU-0003f3-So for submit@debbugs.gnu.org; Wed, 06 Apr 2022 15:47:11 -0400 Received: from [37.120.193.124] (port=35924 helo=mail.cock.li) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncBcR-0003eZ-Vg for 54068@debbugs.gnu.org; Wed, 06 Apr 2022 15:47:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1649274421; bh=edIYvqfL75Myy2hD3ylHjdLclr3WEkF0Cl5PZzvQaeg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=zl8FVe7tw0R4lJbg4X5mrgrmeFcE2xV/ahvTLwuA0fJPObxS25GMB0tPjges3trg+ GGFfTZoa2tevqMhwXzWQj2jgbzUuIdjJC4Gl2u+iStzTIWOkHF0FdfKf1tStsPzXQ9 4GV+EcSoSTDMeJBqodlRFxdOmIUWciE39rqVfOFz69WpKtinPsh9J4ZMqmYmxOT/42 5N6dCQegX/Cg1Xjz5Y7YQg+xUL2qBe4q5C9A+ix0kS7hlehNfh4+htdS+43/VOZJeb NDsxdYSM4qbzxzLFQH+Xi9JUbKdj5m0XYjuiMO7qEY3NvlM1AAo+q0D29HXGCb4XNr 0w6EEj/3gLSCQ== Message-ID: Date: Wed, 6 Apr 2022 15:46:54 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: fr References: <356b1509-0df9-6579-d440-95bc74c9f2e3@cock.li> <87pmlvmxqq.fsf_-_@gnu.org> <73ba1436-5434-c771-258d-d3a97f3ff5df@cock.li> <5effc6fe-1f61-3a97-5185-919b340bf287@cock.li> <172ba8211c961d060cb98166f9ff8fe6062b7ea9.camel@telenet.be> From: Justin Veilleux In-Reply-To: <172ba8211c961d060cb98166f9ff8fe6062b7ea9.camel@telenet.be> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 From 0851821735fef3df3e1792644a8544af79a45e0f Mon Sep 17 00:00:00 2001 From: terramorpha 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 ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2021 John Kehayias +;;; Copyright © 2022 Justin Veilleux ;;; ;;; 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