diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2018-01-26 23:17:38 +0100 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2018-01-28 10:17:36 -0500 |
commit | 3979a20d7489efb7f12b2f477e92d4596b9bab31 (patch) | |
tree | 179fa749be4402da63e462bd556c7531f68f3311 /pkgs/applications/altcoins | |
parent | 50dda062d872c82e075458186fede4f70c79eb61 (diff) |
monero: build libmonero-wallet
Diffstat (limited to 'pkgs/applications/altcoins')
-rw-r--r-- | pkgs/applications/altcoins/monero/build-wallet-rpc.patch | 78 | ||||
-rw-r--r-- | pkgs/applications/altcoins/monero/default.nix | 46 |
2 files changed, 124 insertions, 0 deletions
diff --git a/pkgs/applications/altcoins/monero/build-wallet-rpc.patch b/pkgs/applications/altcoins/monero/build-wallet-rpc.patch new file mode 100644 index 0000000000000..5436332db8020 --- /dev/null +++ b/pkgs/applications/altcoins/monero/build-wallet-rpc.patch @@ -0,0 +1,78 @@ +diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt +index 63908005..f6656d5c 100644 +--- a/src/wallet/CMakeLists.txt ++++ b/src/wallet/CMakeLists.txt +@@ -86,43 +86,40 @@ target_link_libraries(wallet + ${EXTRA_LIBRARIES}) + add_dependencies(wallet version) + +-if (NOT BUILD_GUI_DEPS) +- set(wallet_rpc_sources +- wallet_rpc_server.cpp) ++set(wallet_rpc_sources ++ wallet_rpc_server.cpp) + +- set(wallet_rpc_headers) ++set(wallet_rpc_headers) + +- set(wallet_rpc_private_headers +- wallet_rpc_server.h) ++set(wallet_rpc_private_headers ++ wallet_rpc_server.h) + +- monero_private_headers(wallet_rpc_server +- ${wallet_rpc_private_headers}) +- monero_add_executable(wallet_rpc_server +- ${wallet_rpc_sources} +- ${wallet_rpc_headers} +- ${wallet_rpc_private_headers}) +- +- target_link_libraries(wallet_rpc_server +- PRIVATE +- wallet +- epee +- rpc +- cryptonote_core +- cncrypto +- common +- ${Boost_CHRONO_LIBRARY} +- ${Boost_PROGRAM_OPTIONS_LIBRARY} +- ${Boost_FILESYSTEM_LIBRARY} +- ${Boost_THREAD_LIBRARY} +- ${CMAKE_THREAD_LIBS_INIT} +- ${EXTRA_LIBRARIES}) +- add_dependencies(wallet_rpc_server version) +- set_property(TARGET wallet_rpc_server +- PROPERTY +- OUTPUT_NAME "monero-wallet-rpc") +- install(TARGETS wallet_rpc_server DESTINATION bin) +-endif() ++monero_private_headers(wallet_rpc_server ++ ${wallet_rpc_private_headers}) ++monero_add_executable(wallet_rpc_server ++ ${wallet_rpc_sources} ++ ${wallet_rpc_headers} ++ ${wallet_rpc_private_headers}) + ++target_link_libraries(wallet_rpc_server ++ PRIVATE ++ wallet ++ epee ++ rpc ++ cryptonote_core ++ cncrypto ++ common ++ ${Boost_CHRONO_LIBRARY} ++ ${Boost_PROGRAM_OPTIONS_LIBRARY} ++ ${Boost_FILESYSTEM_LIBRARY} ++ ${Boost_THREAD_LIBRARY} ++ ${CMAKE_THREAD_LIBS_INIT} ++ ${EXTRA_LIBRARIES}) ++add_dependencies(wallet_rpc_server version) ++set_property(TARGET wallet_rpc_server ++ PROPERTY ++ OUTPUT_NAME "monero-wallet-rpc") ++install(TARGETS wallet_rpc_server DESTINATION bin) + + # build and install libwallet_merged only if we building for GUI + if (BUILD_GUI_DEPS) diff --git a/pkgs/applications/altcoins/monero/default.nix b/pkgs/applications/altcoins/monero/default.nix new file mode 100644 index 0000000000000..4b1e9cd4ea3ee --- /dev/null +++ b/pkgs/applications/altcoins/monero/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchpatch, fetchFromGitHub, cmake +, boost, miniupnpc, openssl, pkgconfig, unbound +}: + +stdenv.mkDerivation rec { + name = "monero-${version}"; + version = "0.11.1.0"; + + src = fetchFromGitHub { + owner = "monero-project"; + repo = "monero"; + rev = "v${version}"; + sha256 = "0nrpxx6r63ia6ard85d504x2kgaikvrhb5sg93ml70l6djyy1148"; + }; + + nativeBuildInputs = [ cmake pkgconfig ]; + + buildInputs = [ boost miniupnpc openssl unbound ]; + + patches = [ + ./build-wallet-rpc.patch # fixed in next release + ]; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DBUILD_GUI_DEPS=ON" + ]; + + doCheck = false; + + installPhase = '' + make install + install -Dt "$out/bin/" \ + bin/monero-blockchain-export \ + bin/monero-blockchain-import \ + bin/monero-wallet-rpc + ''; + + meta = with stdenv.lib; { + description = "Private, secure, untraceable currency"; + homepage = https://getmonero.org/; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = [ maintainers.ehmry ]; + }; +} |