Merge pull request #227028 from wegank/cpuminer-aarch64-darwin

cpuminer: unbreak on aarch64-darwin
This commit is contained in:
Weijia Wang
2023-04-19 17:15:09 +03:00
committed by GitHub
+12 -4
View File
@@ -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;
};
}