mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
monero: build libmonero-wallet
This commit is contained in:
parent
50dda062d8
commit
3979a20d74
4 changed files with 125 additions and 45 deletions
78
pkgs/applications/altcoins/monero/build-wallet-rpc.patch
Normal file
78
pkgs/applications/altcoins/monero/build-wallet-rpc.patch
Normal file
|
@ -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)
|
46
pkgs/applications/altcoins/monero/default.nix
Normal file
46
pkgs/applications/altcoins/monero/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
{ stdenv, fetchFromGitHub, cmake, boost, miniupnpc, openssl, pkgconfig, unbound }:
|
||||
|
||||
let
|
||||
version = "0.11.1.0";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "monero-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "monero-project";
|
||||
repo = "monero";
|
||||
rev = "v${version}";
|
||||
sha256 = "0nrpxx6r63ia6ard85d504x2kgaikvrhb5sg93ml70l6djyy1148";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
buildInputs = [ boost miniupnpc openssl unbound ];
|
||||
|
||||
# these tests take a long time and don't
|
||||
# always complete in the build environment
|
||||
postPatch = "sed -i '/add_subdirectory(tests)/d' CMakeLists.txt";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
install -Dt "$out/bin/" \
|
||||
bin/monerod \
|
||||
bin/monero-blockchain-export \
|
||||
bin/monero-blockchain-import \
|
||||
bin/monero-wallet-cli \
|
||||
bin/monero-wallet-rpc
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Private, secure, untraceable currency";
|
||||
homepage = https://getmonero.org/;
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
|
@ -16118,7 +16118,7 @@ with pkgs;
|
|||
|
||||
mod-distortion = callPackage ../applications/audio/mod-distortion { };
|
||||
|
||||
monero = callPackage ../applications/misc/monero { };
|
||||
monero = callPackage ../applications/altcoins/monero { };
|
||||
|
||||
xmr-stak = callPackage ../applications/misc/xmr-stak {
|
||||
hwloc = hwloc-nox;
|
||||
|
|
Loading…
Reference in a new issue