diff --git a/pkgs/tools/misc/cpuminer/default.nix b/pkgs/tools/misc/cpuminer/default.nix index 69fcb76cf649..28335ccb4481 100644 --- a/pkgs/tools/misc/cpuminer/default.nix +++ b/pkgs/tools/misc/cpuminer/default.nix @@ -1,5 +1,7 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub +, fetchpatch , curl , jansson , perl @@ -17,7 +19,15 @@ stdenv.mkDerivation rec { sha256 = "0f44i0z8rid20c2hiyp92xq0q0mjj537r05sa6vdbc0nl0a5q40i"; }; - patchPhase = if stdenv.cc.isClang then "${perl}/bin/perl ./nomacro.pl" else null; + patches = [ + (fetchpatch { + name = "fix-build-on-aarch64.patch"; + url = "https://github.com/pooler/cpuminer/commit/5f02105940edb61144c09a7eb960bba04a10d5b7.patch"; + hash = "sha256-lGAcwDcXgcJBFhasSEdQIEIY7pp6x/PEXHBsVwAOqhc="; + }) + ]; + + postPatch = if stdenv.cc.isClang then "${perl}/bin/perl ./nomacro.pl" else null; nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ curl jansson ]; @@ -30,7 +40,5 @@ stdenv.mkDerivation rec { license = licenses.gpl2; platforms = platforms.all; maintainers = with maintainers; [ pSub ]; - # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; }; }