From patchwork Wed Apr 6 00:51:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Justin Veilleux X-Patchwork-Id: 38344 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 3F59827BBE9; Wed, 6 Apr 2022 01:52:14 +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 7914527BBEA for ; Wed, 6 Apr 2022 01:52:12 +0100 (BST) Received: from localhost ([::1]:46696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbtu7-0002Vk-G2 for patchwork@mira.cbaines.net; Tue, 05 Apr 2022 20:52:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbtty-0002VL-Fh for guix-patches@gnu.org; Tue, 05 Apr 2022 20:52:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbtty-0002Rp-6q for guix-patches@gnu.org; Tue, 05 Apr 2022 20:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nbtty-0002d7-4A for guix-patches@gnu.org; Tue, 05 Apr 2022 20:52: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 00:52: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: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 54068@debbugs.gnu.org, Maxime Devos Received: via spool by 54068-submit@debbugs.gnu.org id=B54068.164920628110007 (code B ref 54068); Wed, 06 Apr 2022 00:52:02 +0000 Received: (at 54068) by debbugs.gnu.org; 6 Apr 2022 00:51:21 +0000 Received: from localhost ([127.0.0.1]:56491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbttJ-0002bK-E6 for submit@debbugs.gnu.org; Tue, 05 Apr 2022 20:51:21 -0400 Received: from [37.120.193.124] (port=44158 helo=mail.cock.li) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbttI-0002av-5R for 54068@debbugs.gnu.org; Tue, 05 Apr 2022 20:51:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1649206274; bh=z8ccDLxCU75HMCv3poYEL/Z+1pypK7OW1pJMRWObcs4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PHYShS7Ak23TKotyKSQlvAJog2qjwNoa/zvIRj//tPjrasfSjEDxok4HDm967Bzkg yFMeV/2c1sQgPKVfKF3mXF1vvtxFMc5vYoIowtBknpA1xrFbgCQHN13bQB9HGSYPsB JR46ZYm6G56wYWXKbumYmNbErA289OVGzAQuAHrzDiSdFMV3Yvfj6rXXTmbEiu/3UM UXnURMVZux/+vVGFgjiDb2rlquYyzeHNzgr1COOQzejpIiPtSldqFpe2UgJePxuYcw Y+AkQADT9SRSvnJ45RjCTYOGMURHnjJj1jHzkMWJqkOOlfs4KMOC0SvFoNLI7opHvl zhbfrau5ofAXg== Message-ID: <208f943c-cc6c-a2c6-5a52-81a9f466831a@cock.li> Date: Tue, 5 Apr 2022 20:51:12 -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> From: Justin Veilleux In-Reply-To: <87pmlvmxqq.fsf_-_@gnu.org> 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 This is the updated patch for xmrig, but I still have to figure out how to package some of p2pool's c++ dependencies. Cheers. From a8003036d713228d0f24324992d296161ac3187b 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 | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 9f2d055048..953e6dd075 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,51 @@ (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.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 + #:modules '((guix build utils) + (guix build cmake-build-system)) + #:phases + #~(modify-phases + %standard-phases + (add-before 'configure 'disable-default-donation + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "src/donate.h" + (("constexpr const int kDefaultDonateLevel = 1;") + "constexpr const int kDefaultDonateLevel = 0;") + (("constexpr const int kMinimumDonateLevel = 1;") + "constexpr const int kMinimumDonateLevel = 0;")))) + (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: This software, because of it's nature, has high energy +consumption.") + (license license:gpl3+))) -- 2.34.0