Merge pull request #192100 from prusnak/elements-aarch64-darwin

elements: fix build on aarch64-darwin (apply changes from bitcoin)
This commit is contained in:
Pavol Rusnak 2022-09-21 11:46:44 +02:00 committed by GitHub
commit 0615155dab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -5,6 +5,7 @@
, pkg-config
, util-linux
, hexdump
, autoSignDarwinBinariesHook
, wrapQtAppsHook ? null
, boost
, libevent
@ -37,6 +38,7 @@ stdenv.mkDerivation rec {
[ autoreconfHook pkg-config ]
++ optionals stdenv.isLinux [ util-linux ]
++ optionals stdenv.isDarwin [ hexdump ]
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ optionals withGui [ wrapQtAppsHook ];
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
@ -56,12 +58,16 @@ stdenv.mkDerivation rec {
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
# fix "Killed: 9 test/test_bitcoin"
# https://github.com/NixOS/nixpkgs/issues/179474
hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "fortify" "stackprotector" ];
checkInputs = [ python3 ];
doCheck = true;
checkFlags =
[ "LC_ALL=C.UTF-8" ]
[ "LC_ALL=en_US.UTF-8" ]
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
# See also https://github.com/NixOS/nixpkgs/issues/24256
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";

View file

@ -32822,11 +32822,13 @@ with pkgs;
miniupnpc = miniupnpc_2;
withGui = true;
boost = boost175;
inherit (darwin) autoSignDarwinBinariesHook;
};
elementsd = callPackage ../applications/blockchains/elements {
miniupnpc = miniupnpc_2;
withGui = false;
boost = boost175;
inherit (darwin) autoSignDarwinBinariesHook;
};
ergo = callPackage ../applications/blockchains/ergo { };