1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00

Merge pull request #122047 from arcnmx/xmrig-msr

xmrig: 6.6.1 -> 6.12.2
This commit is contained in:
Sandro 2021-06-03 17:09:03 +02:00 committed by GitHub
commit e6c9fc91e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 5 deletions

View file

@ -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 = ''

View 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 */