Merge pull request #129573 from viric/oxen

authored by

Sandro and committed by
GitHub
3693431b 2fcf650a

+71
+67
pkgs/applications/blockchains/oxen/default.nix
···
··· 1 + { stdenv, lib, fetchurl, fetchFromGitHub, fetchpatch 2 + , cmake, pkg-config 3 + , boost, openssl, unbound 4 + , pcsclite, readline, libsodium, hidapi 5 + , rapidjson 6 + , curl, sqlite 7 + , trezorSupport ? true 8 + , libusb1 9 + , protobuf 10 + , python3 11 + }: 12 + 13 + stdenv.mkDerivation rec { 14 + pname = "oxen"; 15 + version = "9.1.3"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "oxen-io"; 19 + repo = "oxen-core"; 20 + rev = "v${version}"; 21 + sha256 = "11g3wqn0syk47yfcsdql5737kpad8skwdxhifn2yaz9zy8n3xqqb"; 22 + fetchSubmodules = true; 23 + }; 24 + 25 + # Required for static linking, the only supported install path 26 + lbzmqsrc = fetchurl { 27 + url = "https://github.com/zeromq/libzmq/releases/download/v4.3.3/zeromq-4.3.3.tar.gz"; 28 + sha512 = "4c18d784085179c5b1fcb753a93813095a12c8d34970f2e1bfca6499be6c9d67769c71c68b7ca54ff181b20390043170e89733c22f76ff1ea46494814f7095b1"; 29 + }; 30 + 31 + postPatch = '' 32 + # remove vendored libraries 33 + rm -r external/rapidjson 34 + sed -i s,/lib/,/lib64/, external/loki-mq/cmake/local-libzmq//LocalLibzmq.cmake 35 + ''; 36 + 37 + postInstall = '' 38 + rm -R $out/lib $out/include 39 + ''; 40 + 41 + nativeBuildInputs = [ cmake pkg-config ]; 42 + 43 + buildInputs = [ 44 + boost openssl unbound 45 + pcsclite readline 46 + libsodium hidapi rapidjson 47 + protobuf curl sqlite 48 + ] ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ]; 49 + 50 + cmakeFlags = [ 51 + "-DCMAKE_BUILD_TYPE=Release" 52 + # "-DUSE_DEVICE_TREZOR=ON" 53 + # "-DBUILD_GUI_DEPS=ON" 54 + "-DReadline_ROOT_DIR=${readline.dev}" 55 + # It build with shared libs but doesn't install them. Fail. 56 + # "-DBUILD_SHARED_LIBS=ON" 57 + "-DLIBZMQ_TARBALL_URL=${lbzmqsrc}" 58 + ] ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF"; 59 + 60 + meta = with lib; { 61 + description = "Private cryptocurrency based on Monero"; 62 + homepage = "https://oxen.io/"; 63 + license = licenses.bsd3; 64 + platforms = platforms.all; 65 + maintainers = [ maintainers.viric ]; 66 + }; 67 + }
+4
pkgs/top-level/all-packages.nix
··· 28540 boost = boost17x; 28541 }; 28542 28543 monero-gui = libsForQt5.callPackage ../applications/blockchains/monero-gui { 28544 boost = boost17x; 28545 };
··· 28540 boost = boost17x; 28541 }; 28542 28543 + oxen = callPackage ../applications/blockchains/oxen { 28544 + boost = boost17x; 28545 + }; 28546 + 28547 monero-gui = libsForQt5.callPackage ../applications/blockchains/monero-gui { 28548 boost = boost17x; 28549 };