git.iko.soy/typeable/nixpkgs
on master help sign in
monero: build libmonero-wallet
commit3979a20d7489efb7f12b2f477e92d4596b9bab31 authorrnhmjoj <rnhmjoj@inventati.org> dateFri 26 Jan 2018, 23:17 (9 years ago) parent50dda06
4 files changed+125−45
pkgs/applications/altcoins/monero/build-wallet-rpc.patch+78 pkgs/applications/altcoins/monero/default.nix+46 pkgs/applications/misc/monero/default.nix−44 pkgs/top-level/all-packages.nix+1−1
pkgs/applications/altcoins/monero/build-wallet-rpc.patchnew file+78
@@ -0,0 +1,78 @@
1+diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
2+index 63908005..f6656d5c 100644
3+--- a/src/wallet/CMakeLists.txt
4++++ b/src/wallet/CMakeLists.txt
5+@@ -86,43 +86,40 @@ target_link_libraries(wallet
6+ ${EXTRA_LIBRARIES})
7+ add_dependencies(wallet version)
8+
9+-if (NOT BUILD_GUI_DEPS)
10+- set(wallet_rpc_sources
11+- wallet_rpc_server.cpp)
12++set(wallet_rpc_sources
13++ wallet_rpc_server.cpp)
14+
15+- set(wallet_rpc_headers)
16++set(wallet_rpc_headers)
17+
18+- set(wallet_rpc_private_headers
19+- wallet_rpc_server.h)
20++set(wallet_rpc_private_headers
21++ wallet_rpc_server.h)
22+
23+- monero_private_headers(wallet_rpc_server
24+- ${wallet_rpc_private_headers})
25+- monero_add_executable(wallet_rpc_server
26+- ${wallet_rpc_sources}
27+- ${wallet_rpc_headers}
28+- ${wallet_rpc_private_headers})
29+-
30+- target_link_libraries(wallet_rpc_server
31+- PRIVATE
32+- wallet
33+- epee
34+- rpc
35+- cryptonote_core
36+- cncrypto
37+- common
38+- ${Boost_CHRONO_LIBRARY}
39+- ${Boost_PROGRAM_OPTIONS_LIBRARY}
40+- ${Boost_FILESYSTEM_LIBRARY}
41+- ${Boost_THREAD_LIBRARY}
42+- ${CMAKE_THREAD_LIBS_INIT}
43+- ${EXTRA_LIBRARIES})
44+- add_dependencies(wallet_rpc_server version)
45+- set_property(TARGET wallet_rpc_server
46+- PROPERTY
47+- OUTPUT_NAME "monero-wallet-rpc")
48+- install(TARGETS wallet_rpc_server DESTINATION bin)
49+-endif()
50++monero_private_headers(wallet_rpc_server
51++ ${wallet_rpc_private_headers})
52++monero_add_executable(wallet_rpc_server
53++ ${wallet_rpc_sources}
54++ ${wallet_rpc_headers}
55++ ${wallet_rpc_private_headers})
56+
57++target_link_libraries(wallet_rpc_server
58++ PRIVATE
59++ wallet
60++ epee
61++ rpc
62++ cryptonote_core
63++ cncrypto
64++ common
65++ ${Boost_CHRONO_LIBRARY}
66++ ${Boost_PROGRAM_OPTIONS_LIBRARY}
67++ ${Boost_FILESYSTEM_LIBRARY}
68++ ${Boost_THREAD_LIBRARY}
69++ ${CMAKE_THREAD_LIBS_INIT}
70++ ${EXTRA_LIBRARIES})
71++add_dependencies(wallet_rpc_server version)
72++set_property(TARGET wallet_rpc_server
73++ PROPERTY
74++ OUTPUT_NAME "monero-wallet-rpc")
75++install(TARGETS wallet_rpc_server DESTINATION bin)
76+
77+ # build and install libwallet_merged only if we building for GUI
78+ if (BUILD_GUI_DEPS)
pkgs/applications/altcoins/monero/default.nixnew file+46
@@ -0,0 +1,46 @@
1+{ stdenv, fetchpatch, fetchFromGitHub, cmake
2+, boost, miniupnpc, openssl, pkgconfig, unbound
3+}:
4+
5+stdenv.mkDerivation rec {
6+ name = "monero-${version}";
7+ version = "0.11.1.0";
8+
9+ src = fetchFromGitHub {
10+ owner = "monero-project";
11+ repo = "monero";
12+ rev = "v${version}";
13+ sha256 = "0nrpxx6r63ia6ard85d504x2kgaikvrhb5sg93ml70l6djyy1148";
14+ };
15+
16+ nativeBuildInputs = [ cmake pkgconfig ];
17+
18+ buildInputs = [ boost miniupnpc openssl unbound ];
19+
20+ patches = [
21+ ./build-wallet-rpc.patch # fixed in next release
22+ ];
23+
24+ cmakeFlags = [
25+ "-DCMAKE_BUILD_TYPE=Release"
26+ "-DBUILD_GUI_DEPS=ON"
27+ ];
28+
29+ doCheck = false;
30+
31+ installPhase = ''
32+ make install
33+ install -Dt "$out/bin/" \
34+ bin/monero-blockchain-export \
35+ bin/monero-blockchain-import \
36+ bin/monero-wallet-rpc
37+ '';
38+
39+ meta = with stdenv.lib; {
40+ description = "Private, secure, untraceable currency";
41+ homepage = https://getmonero.org/;
42+ license = licenses.bsd3;
43+ platforms = platforms.all;
44+ maintainers = [ maintainers.ehmry ];
45+ };
46+}
pkgs/applications/misc/monero/default.nixdeleted−44
@@ -1,44 +0,0 @@
1−{ stdenv, fetchFromGitHub, cmake, boost, miniupnpc, openssl, pkgconfig, unbound }:
2−
3−let
4− version = "0.11.1.0";
5−in
6−stdenv.mkDerivation {
7− name = "monero-${version}";
8−
9− src = fetchFromGitHub {
10− owner = "monero-project";
11− repo = "monero";
12− rev = "v${version}";
13− sha256 = "0nrpxx6r63ia6ard85d504x2kgaikvrhb5sg93ml70l6djyy1148";
14− };
15−
16− nativeBuildInputs = [ cmake pkgconfig ];
17−
18− buildInputs = [ boost miniupnpc openssl unbound ];
19−
20− # these tests take a long time and don't
21− # always complete in the build environment
22− postPatch = "sed -i '/add_subdirectory(tests)/d' CMakeLists.txt";
23−
24− NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
25−
26− doCheck = false;
27−
28− installPhase = ''
29− install -Dt "$out/bin/" \
30− bin/monerod \
31− bin/monero-blockchain-export \
32− bin/monero-blockchain-import \
33− bin/monero-wallet-cli \
34− bin/monero-wallet-rpc
35− '';
36−
37− meta = with stdenv.lib; {
38− description = "Private, secure, untraceable currency";
39− homepage = https://getmonero.org/;
40− license = licenses.bsd3;
41− maintainers = [ maintainers.ehmry ];
42− platforms = [ "x86_64-linux" ];
43− };
44−}
pkgs/top-level/all-packages.nix+1−1
@@ -16118,7 +16118,7 @@ with pkgs;
1611816118
1611916119 mod-distortion = callPackage ../applications/audio/mod-distortion { };
1612016120
16121− monero = callPackage ../applications/misc/monero { };
16121+ monero = callPackage ../applications/altcoins/monero { };
1612216122
1612316123 xmr-stak = callPackage ../applications/misc/xmr-stak {
1612416124 hwloc = hwloc-nox;