mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
xmrig: 6.6.1 -> 6.12.2
This commit is contained in:
parent
bfdf04bd21
commit
78e77a0c4d
@ -4,22 +4,23 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xmrig";
|
||||
version = "6.6.1";
|
||||
version = "6.12.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xmrig";
|
||||
repo = "xmrig";
|
||||
rev = "v${version}";
|
||||
sha256 = "03phq1c6fylvkg5x7l0bskspr9jdfx61jy67yx2lxhymqgpbf64z";
|
||||
sha256 = "1gjwh509cxs8vqz72v97cir0aazcrd9y9l0k1q5ywbl5l3yf6ryf";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ libuv libmicrohttpd openssl hwloc ];
|
||||
|
||||
inherit donateLevel;
|
||||
|
||||
patches = [ ./donate-level.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace src/donate.h \
|
||||
--replace "kDefaultDonateLevel = 5;" "kDefaultDonateLevel = ${toString donateLevel};" \
|
||||
--replace "kMinimumDonateLevel = 1;" "kMinimumDonateLevel = ${toString donateLevel};"
|
||||
substituteAllInPlace src/donate.h
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
12
pkgs/applications/misc/xmrig/donate-level.patch
Normal file
12
pkgs/applications/misc/xmrig/donate-level.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/src/donate.h b/src/donate.h
|
||||
--- a/src/donate.h
|
||||
+++ b/src/donate.h
|
||||
@@ -46,6 +46,6 @@
|
||||
*/
|
||||
-constexpr const int kDefaultDonateLevel = 1;
|
||||
-constexpr const int kMinimumDonateLevel = 1;
|
||||
+constexpr const int kDefaultDonateLevel = @donateLevel@;
|
||||
+constexpr const int kMinimumDonateLevel = @donateLevel@;
|
||||
|
||||
|
||||
#endif /* XMRIG_DONATE_H */
|
Loading…
Reference in New Issue
Block a user