diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/applications/blockchains/monero/default.nix | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/blockchains/monero/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/applications/blockchains/monero/default.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/blockchains/monero/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/blockchains/monero/default.nix new file mode 100644 index 000000000000..7d55a5f6f34c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/blockchains/monero/default.nix @@ -0,0 +1,68 @@ +{ stdenv, fetchFromGitHub, fetchpatch +, cmake, pkgconfig +, boost, miniupnpc, openssl, unbound +, zeromq, pcsclite, readline, libsodium, hidapi +, randomx, rapidjson +, CoreData, IOKit, PCSC +, trezorSupport ? true +, libusb1 ? null +, protobuf ? null +, python3 ? null +}: + +with stdenv.lib; + +assert stdenv.isDarwin -> IOKit != null; +assert trezorSupport -> all (x: x!=null) [ libusb1 protobuf python3 ]; + +stdenv.mkDerivation rec { + pname = "monero"; + version = "0.17.1.0"; + + src = fetchFromGitHub { + owner = "monero-project"; + repo = "monero"; + rev = "v${version}"; + sha256 = "1cngniv7sndy8r0fcfgk737640k53q3kwd36g891p5igcb985qdw"; + fetchSubmodules = true; + }; + + patches = [ + ./use-system-libraries.patch + ]; + + postPatch = '' + # remove vendored libraries + rm -r external/{miniupnp,randomx,rapidjson,unbound} + # export patched source for monero-gui + cp -r . $source + ''; + + nativeBuildInputs = [ cmake pkgconfig ]; + + buildInputs = [ + boost miniupnpc openssl unbound + zeromq pcsclite readline + libsodium hidapi randomx rapidjson + protobuf + ] ++ optionals stdenv.isDarwin [ IOKit CoreData PCSC ] + ++ optionals trezorSupport [ libusb1 protobuf python3 ]; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DUSE_DEVICE_TREZOR=ON" + "-DBUILD_GUI_DEPS=ON" + "-DReadline_ROOT_DIR=${readline.dev}" + "-DRandomX_ROOT_DIR=${randomx}" + ] ++ optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF"; + + outputs = [ "out" "source" ]; + + meta = with stdenv.lib; { + description = "Private, secure, untraceable currency"; + homepage = "https://getmonero.org/"; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = with maintainers; [ ehmry rnhmjoj ]; + }; +} |