From c2241c55cccda0956ba99e2ab443d29b326657fc Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 23 Feb 2024 20:55:36 +0000 Subject: [PATCH] xmrig-mo: 6.20.0-mo1 -> 6.21.0-mo2 Changes: https://github.com/MoneroOcean/xmrig/releases/tag/v6.21.0-mo2 Without the change build fails on `master` against `gcc-13` as https://hydra.nixos.org/build/248994717: /build/source/src/backend/opencl/runners/OclRyoRunner.cpp: In member function 'virtual void xmrig::OclRyoRunner::set(const xmrig::Job&, uint8_t*)': /build/source/src/backend/opencl/runners/OclRyoRunner.cpp:92:20: error: 'length_error' is not a member of 'std' 92 | throw std::length_error("job size too big"); | ^~~~~~~~~~~~ --- pkgs/applications/misc/xmrig/moneroocean.nix | 21 +++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/xmrig/moneroocean.nix b/pkgs/applications/misc/xmrig/moneroocean.nix index ba643eb77b45..0e4ac69cb813 100644 --- a/pkgs/applications/misc/xmrig/moneroocean.nix +++ b/pkgs/applications/misc/xmrig/moneroocean.nix @@ -1,16 +1,31 @@ -{ stdenv, fetchFromGitHub, lib, xmrig }: +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, xmrig +}: xmrig.overrideAttrs (oldAttrs: rec { pname = "xmrig-mo"; - version = "6.20.0-mo1"; + version = "6.21.0-mo2"; src = fetchFromGitHub { owner = "MoneroOcean"; repo = "xmrig"; rev = "v${version}"; - sha256 = "sha256-yHAipyZJXwH21u4YwjUqDCsXHVrI+eSnp4Iqt3AZC9A="; + hash = "sha256-OKyJcmhlY8gfDKyBf83KHhokp4qA8EDyessTwKReaD8="; }; + patches = [ + # Fix build against gcc-13 due to missing include + # https://github.com/MoneroOcean/xmrig/pull/123 + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/MoneroOcean/xmrig/commit/7d3ea51d68049c35e9d4c75732c751eefbc5ab29.patch"; + hash = "sha256-iNrtZ8LxNJMzn8kXLhYGEFAy0ughfOZobDVRImpVPC0="; + }) + ]; + meta = with lib; { description = "A fork of the XMRig CPU miner with support for algorithm switching"; homepage = "https://github.com/MoneroOcean/xmrig";