summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Westover2022-01-11 18:26:17 -0500
committerBen Westover2022-01-11 18:26:17 -0500
commitdac42bc7526b39993dd8b2f5874409e5908d2d89 (patch)
tree214eb1049f2312aa3b0b51d14c68b8f686bcf678
parentf95bcfa6918e4e649be500471e63a32080d3d8bb (diff)
downloadaur-dac42bc7526b39993dd8b2f5874409e5908d2d89.tar.gz
Fix every last issue with the GUI, hopefully
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD27
-rw-r--r--fix-404.patch12
-rw-r--r--fix-wx-issues.patch32
-rw-r--r--nuxhash-git.install3
-rw-r--r--nuxhash-gui.desktop10
-rw-r--r--p310-compliance.patch30
7 files changed, 117 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3883f13acdf3..ab9d2877e44d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
pkgbase = nuxhash-git
pkgdesc = A NiceHash cryptocurrency mining client for Linux.
pkgver = v1.0.0b2.r33.g33e9a09
- pkgrel = 5
+ pkgrel = 6
url = https://github.com/YoRyan/nuxhash
- install = nuxhash-git.install
arch = x86_64
license = GPL3
makedepends = python-setuptools
@@ -13,7 +12,17 @@ pkgbase = nuxhash-git
depends = nvidia
depends = opencl-nvidia
depends = cuda
+ optdepends = python-wxpython: GUI support
+ optdepends = python-pypubsub: GUI support
source = git+https://github.com/YoRyan/nuxhash.git
+ source = fix-wx-issues.patch
+ source = fix-404.patch
+ source = p310-compliance.patch
+ source = nuxhash-gui.desktop
sha256sums = SKIP
+ sha256sums = 79c56a0fcc373cc76d5b627514103cb4914f7a45780f131ac4a81946b0371bbd
+ sha256sums = 55d410a61aa080e0680091fbf3dd3e54837c11b60c13257d2c7e6b75395b20c6
+ sha256sums = 794ac3d36cbff363d80ca82b3d9c42fb29be6a7afd3e9712223407161b4198ef
+ sha256sums = 779c28c990c97b6c6fb2b2ad1cf84ff99dcdf5c1b72f034750994fdc8a645055
pkgname = nuxhash-git
diff --git a/PKGBUILD b/PKGBUILD
index a2b196c02447..291e2565b134 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,23 +2,40 @@
pkgname='nuxhash-git'
pkgver=v1.0.0b2.r33.g33e9a09
-pkgrel=5
+pkgrel=6
pkgdesc="A NiceHash cryptocurrency mining client for Linux."
arch=('x86_64')
url="https://github.com/YoRyan/nuxhash"
license=('GPL3')
depends=('python' 'python-requests' 'curl' 'nvidia' 'opencl-nvidia' 'cuda')
makedepends=('python-setuptools')
-source=("git+https://github.com/YoRyan/nuxhash.git")
-sha256sums=('SKIP')
-install=nuxhash-git.install
+optdepends=('python-wxpython: GUI support'
+ 'python-pypubsub: GUI support')
+source=("git+https://github.com/YoRyan/nuxhash.git"
+ "fix-wx-issues.patch"
+ "fix-404.patch"
+ "p310-compliance.patch"
+ "nuxhash-gui.desktop")
+sha256sums=('SKIP'
+ '79c56a0fcc373cc76d5b627514103cb4914f7a45780f131ac4a81946b0371bbd'
+ '55d410a61aa080e0680091fbf3dd3e54837c11b60c13257d2c7e6b75395b20c6'
+ '794ac3d36cbff363d80ca82b3d9c42fb29be6a7afd3e9712223407161b4198ef'
+ '779c28c990c97b6c6fb2b2ad1cf84ff99dcdf5c1b72f034750994fdc8a645055')
pkgver() {
cd nuxhash
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
+prepare() {
+ patch -p1 < fix-wx-issues.patch
+ patch -p1 < fix-404.patch
+ patch -p1 < p310-compliance.patch
+}
+
package() {
cd nuxhash
- python setup.py install --optimize=1 --root "$pkgdir"
+ python3 setup.py install --optimize=1 --root "$pkgdir"
+ install -Dm644 nuxhash/gui/icons/nuxhash.svg "$pkgdir/usr/share/pixmaps/nuxhash.svg"
+ install -Dm644 ../nuxhash-gui.desktop "$pkgdir/usr/share/applications/nuxhash-gui.desktop"
}
diff --git a/fix-404.patch b/fix-404.patch
new file mode 100644
index 000000000000..d06e63246210
--- /dev/null
+++ b/fix-404.patch
@@ -0,0 +1,12 @@
+diff -r -U 0 a/nuxhash/nuxhash/nhrest/python/nicehash.py b/nuxhash/nuxhash/nhrest/python/nicehash.py
+--- a/nuxhash/nuxhash/nhrest/python/nicehash.py 2022-01-11 13:45:29.215436461 -0500
++++ b/nuxhash/nuxhash/nhrest/python/nicehash.py 2022-01-11 13:47:15.789264605 -0500
+@@ -165 +165 @@
+- return self.request('GET', '/main/api/v2/accounting/accounts/', '', None)
++ return self.request('GET', '/main/api/v2/accounting/accounts2/', '', None)
+diff -r -U 0 a/nuxhash/nuxhash/nicehash.py b/nuxhash/nuxhash/nicehash.py
+--- a/nuxhash/nuxhash/nicehash.py 2022-01-11 13:45:29.215436461 -0500
++++ b/nuxhash/nuxhash/nicehash.py 2022-01-11 13:47:26.635552456 -0500
+@@ -27 +27 @@
+- 'GET', f'/main/api/v2/mining/external/{address}/rigs/', '', None)
++ 'GET', f'/main/api/v2/mining/external/{address}/rigs2/', '', None)
diff --git a/fix-wx-issues.patch b/fix-wx-issues.patch
new file mode 100644
index 000000000000..fa998aa84d4d
--- /dev/null
+++ b/fix-wx-issues.patch
@@ -0,0 +1,32 @@
+diff -r -U 0 a/nuxhash/nuxhash/gui/benchmarks.py b/nuxhash/nuxhash/gui/benchmarks.py
+--- a/nuxhash/nuxhash/gui/benchmarks.py 2022-01-11 13:45:29.211436355 -0500
++++ b/nuxhash/nuxhash/gui/benchmarks.py 2022-01-11 13:54:25.729552602 -0500
+@@ -7 +7 @@
+-from wx.lib.pubsub import pub
++from pubsub import pub
+diff -r -U 0 a/nuxhash/nuxhash/gui/main.py b/nuxhash/nuxhash/gui/main.py
+--- a/nuxhash/nuxhash/gui/main.py 2022-01-11 13:45:29.211436355 -0500
++++ b/nuxhash/nuxhash/gui/main.py 2022-01-11 13:54:31.362631038 -0500
+@@ -10 +10 @@
+-from wx.lib.pubsub import pub
++from pubsub import pub
+diff -r -U 0 a/nuxhash/nuxhash/gui/mining.py b/nuxhash/nuxhash/gui/mining.py
+--- a/nuxhash/nuxhash/gui/mining.py 2022-01-11 13:45:29.211436355 -0500
++++ b/nuxhash/nuxhash/gui/mining.py 2022-01-11 13:56:53.792824763 -0500
+@@ -12 +12 @@
+-from wx.lib.pubsub import pub
++from pubsub import pub
+@@ -67,2 +67 @@
+- sizer.Add(bottomSizer, wx.SizerFlags().Border(wx.ALL, main.PADDING_PX)
+- .Expand())
++ sizer.Add(bottomSizer, wx.SizerFlags().Border(wx.ALL, main.PADDING_PX).Expand())
+@@ -91,2 +90 @@
+- bottomSizer.Add(self._StartStop, wx.SizerFlags().Expand()
+- .Center())
++ bottomSizer.Add(self._StartStop, wx.SizerFlags().Center())
+diff -r -U 0 a/nuxhash/nuxhash/gui/settings.py b/nuxhash/nuxhash/gui/settings.py
+--- a/nuxhash/nuxhash/gui/settings.py 2022-01-11 13:45:29.211436355 -0500
++++ b/nuxhash/nuxhash/gui/settings.py 2022-01-11 13:55:08.500165099 -0500
+@@ -5 +5 @@
+-from wx.lib.pubsub import pub
++from pubsub import pub
diff --git a/nuxhash-git.install b/nuxhash-git.install
deleted file mode 100644
index ef958238ab9a..000000000000
--- a/nuxhash-git.install
+++ /dev/null
@@ -1,3 +0,0 @@
-post_install() {
- echo -e "\033[1;32m==>\033[0m \033[1mThe GUI will fail to launch because of https://github.com/YoRyan/nuxhash/issues/119. If you need the GUI, install nuxhash-venv-git."
-}
diff --git a/nuxhash-gui.desktop b/nuxhash-gui.desktop
new file mode 100644
index 000000000000..4b78ded88a48
--- /dev/null
+++ b/nuxhash-gui.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Nuxhash
+Comment=A NiceHash cryptocurrency mining client for Linux.
+Exec=nuxhash-gui %u
+Terminal=false
+Type=Application
+Icon=nuxhash
+MimeType=x-scheme-handler/btchd;
+Categories=Internet;Finance;P2P;Network;Qt;
diff --git a/p310-compliance.patch b/p310-compliance.patch
new file mode 100644
index 000000000000..e7fbb7f3ea05
--- /dev/null
+++ b/p310-compliance.patch
@@ -0,0 +1,30 @@
+diff -r -U 0 a/nuxhash/nuxhash/gui/about.py b/nuxhash/nuxhash/gui/about.py
+--- a/nuxhash/nuxhash/gui/about.py 2022-01-11 17:00:33.364855467 -0500
++++ b/nuxhash/nuxhash/gui/about.py 2022-01-11 17:01:19.702270077 -0500
+@@ -23 +23 @@
+- h_sizer.Add(v_sizer, wx.SizerFlags().Proportion(1.0)
++ h_sizer.Add(v_sizer, wx.SizerFlags().Proportion(1)
+diff -r -U 0 a/nuxhash/nuxhash/gui/benchmarks.py b/nuxhash/nuxhash/gui/benchmarks.py
+--- a/nuxhash/nuxhash/gui/benchmarks.py 2022-01-11 17:00:33.404856688 -0500
++++ b/nuxhash/nuxhash/gui/benchmarks.py 2022-01-11 17:02:08.670764883 -0500
+@@ -56 +56 @@
+- .Proportion(1.0)
++ .Proportion(1)
+diff -r -U 0 a/nuxhash/nuxhash/gui/mining.py b/nuxhash/nuxhash/gui/mining.py
+--- a/nuxhash/nuxhash/gui/mining.py 2022-01-11 17:00:33.404856688 -0500
++++ b/nuxhash/nuxhash/gui/mining.py 2022-01-11 17:02:42.848808134 -0500
+@@ -57 +57 @@
+- self._Timer.Start(milliseconds=BALANCE_UPDATE_MIN*60*1e3)
++ self._Timer.Start(milliseconds=BALANCE_UPDATE_MIN*60*1000)
+@@ -63 +63 @@
+- .Proportion(1.0)
++ .Proportion(1)
+@@ -72 +72 @@
+- bottomSizer.Add(balances, wx.SizerFlags().Proportion(1.0).Expand())
++ bottomSizer.Add(balances, wx.SizerFlags().Proportion(1).Expand())
+diff -r -U 0 a/nuxhash/nuxhash/gui/settings.py b/nuxhash/nuxhash/gui/settings.py
+--- a/nuxhash/nuxhash/gui/settings.py 2022-01-11 17:59:20.480302893 -0500
++++ b/nuxhash/nuxhash/gui/settings.py 2022-01-11 18:00:54.151921534 -0500
+@@ -195 +195 @@
+- self._Threshold.SetValue(self._Settings['switching']['threshold']*100)
++ self._Threshold.SetValue(int(self._Settings['switching']['threshold']*100))