nixpkgs/pkgs/applications/misc/cpp-ethereum/default.nix

86 lines
1.6 KiB
Nix
Raw Normal View History

2016-10-03 11:22:44 +02:00
{ stdenv
, fetchFromGitHub
, cmake
, jsoncpp
, libjson-rpc-cpp
2016-10-03 11:22:44 +02:00
, curl
, boost
, leveldb
, cryptopp
, libcpuid
, opencl-headers
, ocl-icd
, miniupnpc
, libmicrohttpd
, gmp
2019-11-10 17:44:34 +01:00
, libGLU, libGL
2016-10-03 11:22:44 +02:00
, extraCmakeFlags ? []
}:
stdenv.mkDerivation rec {
pname = "cpp-ethereum";
2016-10-03 11:22:44 +02:00
version = "1.3.0";
src = fetchFromGitHub {
owner = "ethereum";
repo = "cpp-ethereum";
rev = "62ab9522e58df9f28d2168ea27999a214b16ea96";
sha256 = "1fxgpqhmjhpv0zzs1m3yf9h8mh25dqpa7pmcfy7f9qiqpfdr4zq9";
};
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" extraCmakeFlags ];
configurePhase = ''
export BOOST_INCLUDEDIR=${boost.dev}/include
export BOOST_LIBRARYDIR=${boost.out}/lib
mkdir -p Build/Install
pushd Build
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/Install $cmakeFlags
'';
enableParallelBuilding = true;
runPath = with stdenv.lib; makeLibraryPath ([ stdenv.cc.cc ] ++ buildInputs);
installPhase = ''
make install
mkdir -p $out
for f in Install/lib/*.so* $(find Install/bin -executable -type f); do
patchelf --set-rpath $runPath:$out/lib $f
done
cp -r Install/* $out
'';
buildInputs = [
cmake
jsoncpp
libjson-rpc-cpp
2016-10-03 11:22:44 +02:00
curl
boost
leveldb
cryptopp
libcpuid
opencl-headers
ocl-icd
miniupnpc
libmicrohttpd
gmp
2019-11-10 17:44:34 +01:00
libGLU libGL
2016-10-03 11:22:44 +02:00
];
dontStrip = true;
meta = with stdenv.lib; {
2016-12-17 04:42:11 +01:00
description = "Ethereum C++ client";
homepage = "https://github.com/ethereum/cpp-ethereum";
2016-10-03 11:22:44 +02:00
license = licenses.gpl3;
maintainers = with maintainers; [ artuuge ];
platforms = platforms.linux;
2018-04-10 22:54:46 +02:00
broken = true; # 2018-04-10
2016-10-03 11:22:44 +02:00
};
}