From a160b5f31ac321dc367aa7c663c94563f67a4550 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 28 Oct 2024 09:49:49 -0400 Subject: [PATCH] hashrat: fix cross compilation --- pkgs/tools/security/hashrat/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/tools/security/hashrat/default.nix b/pkgs/tools/security/hashrat/default.nix index c19f683f4bea2..f7ebc1179093f 100644 --- a/pkgs/tools/security/hashrat/default.nix +++ b/pkgs/tools/security/hashrat/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch }: stdenv.mkDerivation rec { @@ -14,6 +15,15 @@ stdenv.mkDerivation rec { hash = "sha256-mjjK315OUUFVdUY+zcCvm7yeo7XxourR1sghWbeFT7c="; }; + patches = [ + # fix cross compilation by replacing hardcoded ar with AC_PROG_AR + # https://github.com/ColumPaget/Hashrat/pull/27 + (fetchpatch { + url = "https://github.com/ColumPaget/Hashrat/commit/a82615e02021245850a1703e613055da2520c8fd.patch"; + hash = "sha256-tjyhM2ahZBRoRP8WjyQhrI3l20oaqMtfYmOeAZVEZqU="; + }) + ]; + configureFlags = [ "--enable-xattr" ]; makeFlags = [ "PREFIX=$(out)" ];