From e4374a3b2f03b9c72be6a08b0181e9744214f79f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 8 Feb 2026 14:51:25 +0000 Subject: [PATCH] hashrat: fix `gcc-15` build failure Without the change build fails on master as https://hydra.nixos.org/build/319912510: ``` xdialog.c:74:9: error: conflicting types for 'XDialogDisplayPage'; have 'STREAM *(const char *, HashratCtx *)' 74 | STREAM *XDialogDisplayPage(const char *Dialog, HashratCtx *Config) | ^~~~~~~~~~~~~~~~~~ ``` --- pkgs/by-name/ha/hashrat/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/ha/hashrat/package.nix b/pkgs/by-name/ha/hashrat/package.nix index e8947b1ad201..6083257ba8d9 100644 --- a/pkgs/by-name/ha/hashrat/package.nix +++ b/pkgs/by-name/ha/hashrat/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, versionCheckHook, nix-update-script, }: @@ -17,6 +18,16 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-nGaOVvy8caySohCGyGdnxXsv2DuqFPRi4JJLlZy+q8o="; }; + patches = [ + # Upstream fix for gcc-15 build failure: + # https://github.com/ColumPaget/Hashrat/pull/33 + (fetchpatch { + name = "gcc-15.patch"; + url = "https://github.com/ColumPaget/Hashrat/commit/5add4a28f34237bf49f37febcf3366d45d4cea4f.patch"; + hash = "sha256-+ydRQJfoZx7g6VzDDs2RWKRmWs5kBNgYfFKfzsAaskE="; + }) + ]; + configureFlags = [ "--enable-xattr" ]; makeFlags = [ "PREFIX=$(out)" ];