2018-05-09 11:20:38 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch
|
|
|
|
, cmake, pkgconfig, git
|
2018-03-31 04:07:28 +02:00
|
|
|
, boost, miniupnpc, openssl, unbound, cppzmq
|
|
|
|
, zeromq, pcsclite, readline
|
2018-04-04 21:33:45 +02:00
|
|
|
, CoreData, IOKit, PCSC
|
2018-01-26 23:17:38 +01:00
|
|
|
}:
|
|
|
|
|
2018-03-31 04:07:28 +02:00
|
|
|
assert stdenv.isDarwin -> IOKit != null;
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
2018-01-26 23:17:38 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "monero-${version}";
|
2018-03-28 06:53:07 +02:00
|
|
|
version = "0.12.0.0";
|
2018-01-26 23:17:38 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "monero-project";
|
|
|
|
repo = "monero";
|
|
|
|
rev = "v${version}";
|
2018-03-28 06:53:07 +02:00
|
|
|
sha256 = "1lc9mkrl1m8mdbvj88y8y5rv44vinxf7dyv221ndmw5c5gs5zfgk";
|
2018-01-26 23:17:38 +01:00
|
|
|
};
|
|
|
|
|
2018-03-28 06:53:07 +02:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig git ];
|
2018-01-26 23:17:38 +01:00
|
|
|
|
2018-05-09 11:20:38 +02:00
|
|
|
patches = [
|
|
|
|
# fix daemon crash, remove with 0.12.1.0 update
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/monero-project/monero/commit/08343ab.diff";
|
|
|
|
sha256 = "0f1snrl2mk2czwk1ysympzr8ismjx39fcqgy13276vcmw0cfqi83";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-03-31 04:07:28 +02:00
|
|
|
buildInputs = [
|
|
|
|
boost miniupnpc openssl unbound
|
|
|
|
cppzmq zeromq pcsclite readline
|
2018-04-04 21:33:45 +02:00
|
|
|
] ++ optionals stdenv.isDarwin [ IOKit CoreData PCSC ];
|
2018-01-26 23:17:38 +01:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
"-DBUILD_GUI_DEPS=ON"
|
2018-03-28 06:53:07 +02:00
|
|
|
"-DReadline_ROOT_DIR=${readline.dev}"
|
2018-01-26 23:17:38 +01:00
|
|
|
];
|
|
|
|
|
2018-03-28 06:53:07 +02:00
|
|
|
hardeningDisable = [ "fortify" ];
|
2018-01-26 23:17:38 +01:00
|
|
|
|
2018-03-31 04:07:28 +02:00
|
|
|
meta = {
|
2018-01-26 23:17:38 +01:00
|
|
|
description = "Private, secure, untraceable currency";
|
|
|
|
homepage = https://getmonero.org/;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
2018-03-31 04:07:28 +02:00
|
|
|
maintainers = with maintainers; [ ehmry rnhmjoj ];
|
2018-01-26 23:17:38 +01:00
|
|
|
};
|
|
|
|
}
|