Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: net-p2p/nuxhash/, net-p2p/nuxhash/files/
Date: Mon, 29 Jun 2020 18:14:48
Message-Id: 1593257140.603c4bf40fbaeafae18d1859c45ee64d324f7a7a.andrewammerlaan@gentoo
1 commit: 603c4bf40fbaeafae18d1859c45ee64d324f7a7a
2 Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
3 AuthorDate: Sat Jun 27 11:22:03 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Sat Jun 27 11:25:40 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=603c4bf4
7
8 net-p2p/nuxhash: new package
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.23
11 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
12
13 net-p2p/nuxhash/Manifest | 1 +
14 .../nuxhash-1.0.0_beta2_p20191013-fixurl.patch | 26 ++++++++++++++
15 .../nuxhash-1.0.0_beta2_p20191013-remove-gui.patch | 12 +++++++
16 net-p2p/nuxhash/metadata.xml | 11 ++++++
17 .../nuxhash/nuxhash-1.0.0_beta2_p20191013.ebuild | 40 ++++++++++++++++++++++
18 5 files changed, 90 insertions(+)
19
20 diff --git a/net-p2p/nuxhash/Manifest b/net-p2p/nuxhash/Manifest
21 new file mode 100644
22 index 0000000..4c82435
23 --- /dev/null
24 +++ b/net-p2p/nuxhash/Manifest
25 @@ -0,0 +1 @@
26 +DIST nuxhash-1.0.0_beta2_p20191013.tar.gz 783977 BLAKE2B 5dd50bd1d62193775b7146d078e4eae62247e1e469ed1966ecab31bf7899d38ddbe31babbf450a165e78c86bc4482f0a7a769225bd2f018515b90255184d8781 SHA512 1d2bb4cc73fd3a9c2e6964d2208ffe8362444bc03c7c2382b4df4231a311daa72026e1d80de347d77765f6ec92af5e339e2d10fdbff7d5272b8fdf8421a5656f
27
28 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
29 new file mode 100644
30 index 0000000..91e2f56
31 --- /dev/null
32 +++ b/net-p2p/nuxhash/files/nuxhash-1.0.0_beta2_p20191013-fixurl.patch
33 @@ -0,0 +1,26 @@
34 +Nicehash URL has changed
35 +
36 +https://github.com/YoRyan/nuxhash/issues/54
37 +
38 +--- a/nuxhash/nicehash.py 2019-10-13 06:10:40.000000000 +0100
39 ++++ b/nuxhash/nicehash.py 2020-05-10 02:50:26.531802156 +0100
40 +@@ -24,7 +24,7 @@
41 + address = nx_settings['nicehash']['wallet']
42 +
43 + response = nh.public_api(HOST).request(
44 +- 'GET', f'/main/api/v2/mining/external/{address}/rigs/', '', None)
45 ++ 'GET', f'/main/api/v2/mining/external/{address}/rigs2/', '', None)
46 + unpaid = response.get('unpaidAmount', None)
47 + if response.get('externalAddress', True):
48 + wallet = response.get('externalBalance', None)
49 +--- a/nuxhash/nhrest/python/nicehash.py 2019-10-13 06:10:40.000000000 +0100
50 ++++ b/nuxhash/nhrest/python/nicehash.py 2020-05-10 02:55:38.189794255 +0100
51 +@@ -162,7 +162,7 @@
52 + return algo_setting
53 +
54 + def get_accounts(self):
55 +- return self.request('GET', '/main/api/v2/accounting/accounts/', '', None)
56 ++ return self.request('GET', '/main/api/v2/accounting/accounts2/', '', None)
57 +
58 + def get_accounts_for_currency(self, currency):
59 + return self.request('GET', '/main/api/v2/accounting/account/' + currency, '', None)
60
61 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
62 new file mode 100644
63 index 0000000..1d86a23
64 --- /dev/null
65 +++ b/net-p2p/nuxhash/files/nuxhash-1.0.0_beta2_p20191013-remove-gui.patch
66 @@ -0,0 +1,12 @@
67 +Disable GUI if USE=-gui
68 +
69 +--- a/setup.py 2020-06-27 00:24:01.872723504 +0100
70 ++++ b/setup.py 2020-06-27 00:30:12.885365693 +0100
71 +@@ -185,7 +185,6 @@
72 + entry_points={ # Optional
73 + 'console_scripts': [
74 + 'nuxhashd=nuxhash:nuxhashd',
75 +- 'nuxhash-gui=nuxhash:nuxhash_gui'
76 + ],
77 + },
78 +
79
80 diff --git a/net-p2p/nuxhash/metadata.xml b/net-p2p/nuxhash/metadata.xml
81 new file mode 100644
82 index 0000000..919e2c6
83 --- /dev/null
84 +++ b/net-p2p/nuxhash/metadata.xml
85 @@ -0,0 +1,11 @@
86 +<?xml version="1.0" encoding="UTF-8"?>
87 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
88 +<pkgmetadata>
89 + <maintainer type="person">
90 + <email>alexey+gentoo@××××××××.org</email>
91 + <name>Alexey Sokolov</name>
92 + </maintainer>
93 + <upstream>
94 + <remote-id type="github">YoRyan/nuxhash</remote-id>
95 + </upstream>
96 +</pkgmetadata>
97
98 diff --git a/net-p2p/nuxhash/nuxhash-1.0.0_beta2_p20191013.ebuild b/net-p2p/nuxhash/nuxhash-1.0.0_beta2_p20191013.ebuild
99 new file mode 100644
100 index 0000000..aa10072
101 --- /dev/null
102 +++ b/net-p2p/nuxhash/nuxhash-1.0.0_beta2_p20191013.ebuild
103 @@ -0,0 +1,40 @@
104 +# Copyright 1999-2020 Gentoo Authors
105 +# Distributed under the terms of the GNU General Public License v2
106 +
107 +EAPI=7
108 +
109 +PYTHON_COMPAT=( python3_{7,8} )
110 +DISTUTILS_USE_SETUPTOOLS=rdepend
111 +inherit distutils-r1 vcs-snapshot
112 +
113 +DESCRIPTION="NiceHash cryptocurrency mining client for Linux"
114 +HOMEPAGE="https://github.com/YoRyan/nuxhash"
115 +
116 +SRC_URI="https://github.com/YoRyan/nuxhash/archive/33e9a095a41a6828959927f867efe4d2df398ede.tar.gz -> ${P}.tar.gz"
117 +LICENSE="GPL-3 excavator-EULA"
118 +SLOT="0"
119 +IUSE="gui"
120 +KEYWORDS="~amd64"
121 +
122 +RDEPEND="
123 + dev-libs/libbsd
124 + dev-python/requests[${PYTHON_USEDEP}]
125 + net-misc/curl
126 + virtual/opencl
127 + >=x11-drivers/nvidia-drivers-387
128 + x11-libs/libxcb
129 + x11-libs/libXau
130 + x11-libs/libXdmcp
131 + x11-libs/libXext
132 + x11-libs/libX11
133 + gui? ( dev-python/wxpython:4.0 )
134 +"
135 +
136 +PATCHES=(
137 + "${FILESDIR}/nuxhash-1.0.0_beta2_p20191013-fixurl.patch"
138 +)
139 +
140 +python_prepare_all() {
141 + use gui || eapply "${FILESDIR}/nuxhash-1.0.0_beta2_p20191013-remove-gui.patch"
142 + distutils-r1_python_prepare_all
143 +}