diff --git a/pkgs/applications/blockchains/elements/default.nix b/pkgs/applications/blockchains/elements/default.nix index 3c07b9b2cca9..be8f4ebb9f86 100644 --- a/pkgs/applications/blockchains/elements/default.nix +++ b/pkgs/applications/blockchains/elements/default.nix @@ -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}"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0e599e5cc261..ec53eedd77ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };