nixpkgs/pkgs/applications/blockchains/monero-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
2.0 KiB
Nix
Raw Normal View History

2021-11-13 22:28:25 +00:00
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
2020-06-18 21:41:04 +00:00
, boost, miniupnpc, openssl, unbound
2018-12-09 14:48:55 +00:00
, zeromq, pcsclite, readline, libsodium, hidapi
2020-10-07 15:32:44 +00:00
, randomx, rapidjson
2018-04-04 19:33:45 +00:00
, CoreData, IOKit, PCSC
2021-07-15 22:13:16 +00:00
, trezorSupport ? true, libusb1, protobuf, python3
2018-01-26 22:17:38 +00:00
}:
let
# submodules
supercop = fetchFromGitHub {
owner = "monero-project";
repo = "supercop";
rev = "633500ad8c8759995049ccd022107d1fa8a1bbc9";
sha256 = "26UmESotSWnQ21VbAYEappLpkEMyl0jiuCaezRYd/sE=";
};
trezor-common = fetchFromGitHub {
owner = "trezor";
repo = "trezor-common";
rev = "bff7fdfe436c727982cc553bdfb29a9021b423b0";
sha256 = "VNypeEz9AV0ts8X3vINwYMOgO8VpNmyUPC4iY3OOuZI=";
};
in
2018-01-26 22:17:38 +00:00
stdenv.mkDerivation rec {
pname = "monero-cli";
2024-03-12 17:53:27 +00:00
version = "0.18.3.2";
2019-11-09 17:47:33 +00:00
src = fetchFromGitHub {
owner = "monero-project";
repo = "monero";
rev = "v${version}";
2024-03-12 17:53:27 +00:00
hash = "sha256-iVxy5SKBowTd8tY1L/MrXAu3r2S7bv67up3qWf0xJiw=";
2018-01-26 22:17:38 +00:00
};
patches = [
./use-system-libraries.patch
];
2020-10-07 15:32:44 +00:00
postPatch = ''
# manually install submodules
rmdir external/{supercop,trezor-common}
ln -sf ${supercop} external/supercop
ln -sf ${trezor-common} external/trezor-common
# export patched source for monero-gui
cp -r . $source
2020-10-07 15:32:44 +00:00
'';
nativeBuildInputs = [ cmake pkg-config ];
2018-01-26 22:17:38 +00:00
2018-03-31 02:07:28 +00:00
buildInputs = [
boost miniupnpc openssl unbound
2020-06-18 21:41:04 +00:00
zeromq pcsclite readline
2019-11-10 14:44:56 +00:00
libsodium hidapi randomx rapidjson
2020-10-07 15:32:44 +00:00
protobuf
2021-07-15 22:13:16 +00:00
] ++ lib.optionals stdenv.isDarwin [ IOKit CoreData PCSC ]
++ lib.optionals trezorSupport [ libusb1 protobuf python3 ];
2018-01-26 22:17:38 +00:00
cmakeFlags = [
2020-06-18 21:41:04 +00:00
"-DUSE_DEVICE_TREZOR=ON"
2018-01-26 22:17:38 +00:00
"-DBUILD_GUI_DEPS=ON"
2018-03-28 04:53:07 +00:00
"-DReadline_ROOT_DIR=${readline.dev}"
2020-10-07 15:32:44 +00:00
"-DRandomX_ROOT_DIR=${randomx}"
2021-07-15 22:13:16 +00:00
] ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF";
2018-01-26 22:17:38 +00:00
outputs = [ "out" "source" ];
meta = with lib; {
2018-01-26 22:17:38 +00:00
description = "Private, secure, untraceable currency";
homepage = "https://getmonero.org/";
2018-01-26 22:17:38 +00:00
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ rnhmjoj ];
2023-09-15 19:54:08 +00:00
mainProgram = "monero-wallet-cli";
2018-01-26 22:17:38 +00:00
};
}