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 | |
parent | 50dda062d872c82e075458186fede4f70c79eb61 (diff) | |
download | nixpkgs-3979a20d7489efb7f12b2f477e92d4596b9bab31.tar nixpkgs-3979a20d7489efb7f12b2f477e92d4596b9bab31.tar.gz nixpkgs-3979a20d7489efb7f12b2f477e92d4596b9bab31.tar.bz2 nixpkgs-3979a20d7489efb7f12b2f477e92d4596b9bab31.tar.lz nixpkgs-3979a20d7489efb7f12b2f477e92d4596b9bab31.tar.xz nixpkgs-3979a20d7489efb7f12b2f477e92d4596b9bab31.tar.zst nixpkgs-3979a20d7489efb7f12b2f477e92d4596b9bab31.zip |
monero: build libmonero-wallet
-rw-r--r-- | pkgs/applications/altcoins/monero/build-wallet-rpc.patch | 78 | ||||
-rw-r--r-- | pkgs/applications/altcoins/monero/default.nix | 46 | ||||
-rw-r--r-- | pkgs/applications/misc/monero/default.nix | 44 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
4 files changed, 125 insertions, 45 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 00000000000..5436332db80 --- /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 00000000000..4b1e9cd4ea3 --- /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 ]; + }; +} diff --git a/pkgs/applications/misc/monero/default.nix b/pkgs/applications/misc/monero/default.nix deleted file mode 100644 index ed2049ee5ab..00000000000 --- a/pkgs/applications/misc/monero/default.nix +++ /dev/null @@ -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" ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7775e511361..ecd3f937c07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; |