1 { stdenv, lib, fetchurl, fetchFromGitHub, cmake, pkg-config
2 , boost, openssl, unbound
3 , pcsclite, readline, libsodium, hidapi
12 stdenv.mkDerivation rec {
16 src = fetchFromGitHub {
20 sha256 = "11g3wqn0syk47yfcsdql5737kpad8skwdxhifn2yaz9zy8n3xqqb";
21 fetchSubmodules = true;
24 # Required for static linking, the only supported install path
26 url = "https://github.com/zeromq/libzmq/releases/download/v4.3.3/zeromq-4.3.3.tar.gz";
27 hash = "sha512-TBjXhAhRecWx/LdTqTgTCVoSyNNJcPLhv8pkmb5snWd2nHHGi3ylT/GBsgOQBDFw6Jczwi92/x6kZJSBT3CVsQ==";
31 # remove vendored libraries
32 rm -r external/rapidjson
33 sed -i s,/lib/,/lib64/, external/loki-mq/cmake/local-libzmq//LocalLibzmq.cmake
37 rm -R $out/lib $out/include
40 nativeBuildInputs = [ cmake pkg-config ];
45 libsodium hidapi rapidjson
47 ] ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ];
50 # "-DUSE_DEVICE_TREZOR=ON"
51 # "-DBUILD_GUI_DEPS=ON"
52 "-DReadline_ROOT_DIR=${readline.dev}"
53 # It build with shared libs but doesn't install them. Fail.
54 # "-DBUILD_SHARED_LIBS=ON"
55 "-DLIBZMQ_TARBALL_URL=${lbzmqsrc}"
56 ] ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF";
59 description = "Private cryptocurrency based on Monero";
60 homepage = "https://oxen.io/";
61 license = licenses.bsd3;
62 platforms = platforms.all;
63 maintainers = [ maintainers.viric ];
64 # Fails to build on gcc-10 due to boost being built with gcc-12.