commit:     603c4bf40fbaeafae18d1859c45ee64d324f7a7a
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sat Jun 27 11:22:03 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sat Jun 27 11:25:40 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=603c4bf4

net-p2p/nuxhash: new package

Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>

 net-p2p/nuxhash/Manifest                           |  1 +
 .../nuxhash-1.0.0_beta2_p20191013-fixurl.patch     | 26 ++++++++++++++
 .../nuxhash-1.0.0_beta2_p20191013-remove-gui.patch | 12 +++++++
 net-p2p/nuxhash/metadata.xml                       | 11 ++++++
 .../nuxhash/nuxhash-1.0.0_beta2_p20191013.ebuild   | 40 ++++++++++++++++++++++
 5 files changed, 90 insertions(+)

diff --git a/net-p2p/nuxhash/Manifest b/net-p2p/nuxhash/Manifest
new file mode 100644
index 0000000..4c82435
--- /dev/null
+++ b/net-p2p/nuxhash/Manifest
@@ -0,0 +1 @@
+DIST nuxhash-1.0.0_beta2_p20191013.tar.gz 783977 BLAKE2B 
5dd50bd1d62193775b7146d078e4eae62247e1e469ed1966ecab31bf7899d38ddbe31babbf450a165e78c86bc4482f0a7a769225bd2f018515b90255184d8781
 SHA512 
1d2bb4cc73fd3a9c2e6964d2208ffe8362444bc03c7c2382b4df4231a311daa72026e1d80de347d77765f6ec92af5e339e2d10fdbff7d5272b8fdf8421a5656f

diff --git a/net-p2p/nuxhash/files/nuxhash-1.0.0_beta2_p20191013-fixurl.patch 
b/net-p2p/nuxhash/files/nuxhash-1.0.0_beta2_p20191013-fixurl.patch
new file mode 100644
index 0000000..91e2f56
--- /dev/null
+++ b/net-p2p/nuxhash/files/nuxhash-1.0.0_beta2_p20191013-fixurl.patch
@@ -0,0 +1,26 @@
+Nicehash URL has changed
+
+https://github.com/YoRyan/nuxhash/issues/54
+
+--- a/nuxhash/nicehash.py      2019-10-13 06:10:40.000000000 +0100
++++ b/nuxhash/nicehash.py      2020-05-10 02:50:26.531802156 +0100
+@@ -24,7 +24,7 @@
+     address = nx_settings['nicehash']['wallet']
+ 
+     response = nh.public_api(HOST).request(
+-            'GET', f'/main/api/v2/mining/external/{address}/rigs/', '', None)
++            'GET', f'/main/api/v2/mining/external/{address}/rigs2/', '', None)
+     unpaid = response.get('unpaidAmount', None)
+     if response.get('externalAddress', True):
+         wallet = response.get('externalBalance', None)
+--- a/nuxhash/nhrest/python/nicehash.py        2019-10-13 06:10:40.000000000 
+0100
++++ b/nuxhash/nhrest/python/nicehash.py        2020-05-10 02:55:38.189794255 
+0100
+@@ -162,7 +162,7 @@
+         return algo_setting
+ 
+     def get_accounts(self):
+-        return self.request('GET', '/main/api/v2/accounting/accounts/', '', 
None)
++        return self.request('GET', '/main/api/v2/accounting/accounts2/', '', 
None)
+ 
+     def get_accounts_for_currency(self, currency):
+         return self.request('GET', '/main/api/v2/accounting/account/' + 
currency, '', None)

diff --git 
a/net-p2p/nuxhash/files/nuxhash-1.0.0_beta2_p20191013-remove-gui.patch 
b/net-p2p/nuxhash/files/nuxhash-1.0.0_beta2_p20191013-remove-gui.patch
new file mode 100644
index 0000000..1d86a23
--- /dev/null
+++ b/net-p2p/nuxhash/files/nuxhash-1.0.0_beta2_p20191013-remove-gui.patch
@@ -0,0 +1,12 @@
+Disable GUI if USE=-gui
+
+--- a/setup.py 2020-06-27 00:24:01.872723504 +0100
++++ b/setup.py 2020-06-27 00:30:12.885365693 +0100
+@@ -185,7 +185,6 @@
+     entry_points={  # Optional
+         'console_scripts': [
+             'nuxhashd=nuxhash:nuxhashd',
+-            'nuxhash-gui=nuxhash:nuxhash_gui'
+         ],
+     },
+ 

diff --git a/net-p2p/nuxhash/metadata.xml b/net-p2p/nuxhash/metadata.xml
new file mode 100644
index 0000000..919e2c6
--- /dev/null
+++ b/net-p2p/nuxhash/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>alexey+gen...@asokolov.org</email>
+               <name>Alexey Sokolov</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">YoRyan/nuxhash</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/net-p2p/nuxhash/nuxhash-1.0.0_beta2_p20191013.ebuild 
b/net-p2p/nuxhash/nuxhash-1.0.0_beta2_p20191013.ebuild
new file mode 100644
index 0000000..aa10072
--- /dev/null
+++ b/net-p2p/nuxhash/nuxhash-1.0.0_beta2_p20191013.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1 vcs-snapshot
+
+DESCRIPTION="NiceHash cryptocurrency mining client for Linux"
+HOMEPAGE="https://github.com/YoRyan/nuxhash";
+
+SRC_URI="https://github.com/YoRyan/nuxhash/archive/33e9a095a41a6828959927f867efe4d2df398ede.tar.gz
 -> ${P}.tar.gz"
+LICENSE="GPL-3 excavator-EULA"
+SLOT="0"
+IUSE="gui"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       dev-libs/libbsd
+       dev-python/requests[${PYTHON_USEDEP}]
+       net-misc/curl
+       virtual/opencl
+       >=x11-drivers/nvidia-drivers-387
+       x11-libs/libxcb
+       x11-libs/libXau
+       x11-libs/libXdmcp
+       x11-libs/libXext
+       x11-libs/libX11
+       gui? ( dev-python/wxpython:4.0 )
+"
+
+PATCHES=(
+       "${FILESDIR}/nuxhash-1.0.0_beta2_p20191013-fixurl.patch"
+)
+
+python_prepare_all() {
+       use gui || eapply 
"${FILESDIR}/nuxhash-1.0.0_beta2_p20191013-remove-gui.patch"
+       distutils-r1_python_prepare_all
+}

Reply via email to