elements: apply fixes from bitcoin package

This commit is contained in:
Pavol Rusnak 2022-09-20 18:32:53 +02:00
parent c70f3686a0
commit cbcdc23b9d
No known key found for this signature in database
GPG key ID: 91F3B339B9A02A3D
2 changed files with 9 additions and 1 deletions

View file

@ -5,6 +5,7 @@
, pkg-config , pkg-config
, util-linux , util-linux
, hexdump , hexdump
, autoSignDarwinBinariesHook
, wrapQtAppsHook ? null , wrapQtAppsHook ? null
, boost , boost
, libevent , libevent
@ -37,6 +38,7 @@ stdenv.mkDerivation rec {
[ autoreconfHook pkg-config ] [ autoreconfHook pkg-config ]
++ optionals stdenv.isLinux [ util-linux ] ++ optionals stdenv.isLinux [ util-linux ]
++ optionals stdenv.isDarwin [ hexdump ] ++ optionals stdenv.isDarwin [ hexdump ]
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ optionals withGui [ wrapQtAppsHook ]; ++ optionals withGui [ wrapQtAppsHook ];
buildInputs = [ boost libevent miniupnpc zeromq zlib ] buildInputs = [ boost libevent miniupnpc zeromq zlib ]
@ -56,12 +58,16 @@ stdenv.mkDerivation rec {
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" "--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 ]; checkInputs = [ python3 ];
doCheck = true; doCheck = true;
checkFlags = 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. # 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 # See also https://github.com/NixOS/nixpkgs/issues/24256
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";

View file

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