haven-cli: 3.0.7 -> 3.3.4

This commit is contained in:
Kamilla Ova 2024-05-21 15:44:01 +03:00
parent b5e9718b7d
commit 334f3dbb88
No known key found for this signature in database
GPG Key ID: 2D525F67791E5834
2 changed files with 25 additions and 26 deletions

View File

@ -1,22 +1,20 @@
{ lib, stdenv, fetchFromGitHub
, cmake, pkg-config
, boost179, miniupnpc, openssl, unbound
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
, boost, miniupnpc, openssl, unbound
, zeromq, pcsclite, readline, libsodium, hidapi
, randomx, rapidjson
, easyloggingpp
, randomx, rapidjson, easyloggingpp
, CoreData, IOKit, PCSC
, trezorSupport ? true, libusb1, protobuf, python3
}:
stdenv.mkDerivation rec {
pname = "haven-cli";
version = "3.0.7";
version = "3.3.4";
src = fetchFromGitHub {
owner = "haven-protocol-org";
repo = "haven-main";
rev = "v${version}";
sha256 = "sha256-HLZ9j75MtF7FkHA4uefkrYp07pVZe1Ac1wny7T0CMpA=";
sha256 = "sha256-jKeLFWJDwS8WWRynkDgBjvjq2EDpTEJadwkNsANQXws=";
fetchSubmodules = true;
};
@ -26,39 +24,38 @@ stdenv.mkDerivation rec {
postPatch = ''
# remove vendored libraries
rm -r external/{miniupnp,randomx,rapidjson,unbound}
rm -r external/{miniupnp,randomx,rapidjson}
# export patched source for haven-gui
cp -r . $source
# fix build on aarch64-darwin
substituteInPlace CMakeLists.txt --replace "-march=x86-64" ""
'';
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
boost179 miniupnpc openssl unbound
boost miniupnpc openssl unbound
zeromq pcsclite readline
libsodium hidapi randomx rapidjson
protobuf
readline easyloggingpp
]
protobuf readline easyloggingpp
] ++ lib.optionals stdenv.isDarwin [ IOKit CoreData PCSC ]
++ lib.optionals trezorSupport [ libusb1 protobuf python3 ];
cmakeFlags = [
"-DUSE_DEVICE_TREZOR=ON"
"-DBUILD_GUI_DEPS=ON"
"-DReadline_ROOT_DIR=${readline.dev}"
"-DReadline_INCLUDE_DIR=${readline.dev}/include/readline"
"-DRandomX_ROOT_DIR=${randomx}"
] ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF";
] ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF"
++ lib.optional (!trezorSupport) "-DUSE_DEVICE_TREZOR=OFF";
outputs = [ "out" "source" ];
meta = with lib; {
description = "Haven Protocol is the world's only network of private stable asset";
homepage = "https://havenprotocol.org/";
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ kim0 ];
description = "Haven Protocol is the world's only network of private stable asset";
homepage = "https://havenprotocol.org/";
license = licenses.bsd3;
platforms = platforms.all;
badPlatforms = [ "x86_64-darwin" ];
maintainers = with maintainers; [ kim0 ];
mainProgram = "haven-wallet-cli";
};
}

View File

@ -2,19 +2,18 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index fb71d2d..3a710a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -200,11 +200,11 @@ if(NOT MANUAL_SUBMODULES)
@@ -364,10 +364,10 @@ if(NOT MANUAL_SUBMODULES)
endfunction ()
message(STATUS "Checking submodules")
- check_submodule(external/miniupnp)
- check_submodule(external/unbound)
- check_submodule(external/rapidjson)
+ # check_submodule(external/miniupnp)
+ # check_submodule(external/unbound)
+ # check_submodule(external/rapidjson)
check_submodule(external/trezor-common)
- check_submodule(external/randomx)
+ # check_submodule(external/randomx)
check_submodule(external/supercop)
endif()
endif()
@ -45,13 +44,15 @@ diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 71b165f..10189ce 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -37,19 +37,9 @@
@@ -37,21 +37,9 @@
find_package(Miniupnpc REQUIRED)
-message(STATUS "Using in-tree miniupnpc")
-set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
-add_subdirectory(miniupnp/miniupnpc)
-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
-set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
-if(MSVC)
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
-elseif(NOT MSVC)
@ -68,10 +69,11 @@ index 71b165f..10189ce 100644
find_package(Unbound)
@@ -80,4 +70,3 @@ endif()
@@ -69,5 +69,4 @@ endif()
add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
-add_subdirectory(randomx EXCLUDE_FROM_ALL)
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index c626e22..be570ed 100644