Loading pkgs/applications/blockchains/haven-cli/default.nix +18 −21 Original line number Diff line number Diff line { 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; }; Loading @@ -26,31 +24,28 @@ 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" ]; Loading @@ -59,6 +54,8 @@ stdenv.mkDerivation rec { homepage = "https://havenprotocol.org/"; license = licenses.bsd3; platforms = platforms.all; badPlatforms = [ "x86_64-darwin" ]; maintainers = with maintainers; [ kim0 ]; mainProgram = "haven-wallet-cli"; }; } pkgs/applications/blockchains/haven-cli/use-system-libraries.patch +7 −5 Original line number Diff line number Diff line Loading @@ -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() Loading Loading @@ -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) Loading @@ -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 Loading Loading
pkgs/applications/blockchains/haven-cli/default.nix +18 −21 Original line number Diff line number Diff line { 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; }; Loading @@ -26,31 +24,28 @@ 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" ]; Loading @@ -59,6 +54,8 @@ stdenv.mkDerivation rec { homepage = "https://havenprotocol.org/"; license = licenses.bsd3; platforms = platforms.all; badPlatforms = [ "x86_64-darwin" ]; maintainers = with maintainers; [ kim0 ]; mainProgram = "haven-wallet-cli"; }; }
pkgs/applications/blockchains/haven-cli/use-system-libraries.patch +7 −5 Original line number Diff line number Diff line Loading @@ -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() Loading Loading @@ -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) Loading @@ -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 Loading