forked from mirrors/nixpkgs
Merge pull request #19009 from artuuge/cpp_ethereum
cpp_ethereum: 1.2.9 -> 1.3.0
This commit is contained in:
commit
2ce23db2c8
84
pkgs/applications/misc/cpp-ethereum/default.nix
Normal file
84
pkgs/applications/misc/cpp-ethereum/default.nix
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
{ stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, jsoncpp
|
||||||
|
, libjson_rpc_cpp
|
||||||
|
, curl
|
||||||
|
, boost
|
||||||
|
, leveldb
|
||||||
|
, cryptopp
|
||||||
|
, libcpuid
|
||||||
|
, opencl-headers
|
||||||
|
, ocl-icd
|
||||||
|
, miniupnpc
|
||||||
|
, libmicrohttpd
|
||||||
|
, gmp
|
||||||
|
, mesa
|
||||||
|
, extraCmakeFlags ? []
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "cpp-ethereum-${version}";
|
||||||
|
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
|
||||||
|
curl
|
||||||
|
boost
|
||||||
|
leveldb
|
||||||
|
cryptopp
|
||||||
|
libcpuid
|
||||||
|
opencl-headers
|
||||||
|
ocl-icd
|
||||||
|
miniupnpc
|
||||||
|
libmicrohttpd
|
||||||
|
gmp
|
||||||
|
mesa
|
||||||
|
];
|
||||||
|
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
decription = "Ethereum C++ client";
|
||||||
|
homepage = https://github.com/ethereum/cpp-ethereum;
|
||||||
|
license = licenses.gpl3;
|
||||||
|
maintainers = with maintainers; [ artuuge ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,115 +0,0 @@
|
||||||
{ stdenv
|
|
||||||
, fetchgit
|
|
||||||
, cmake
|
|
||||||
, boost
|
|
||||||
, gmp
|
|
||||||
, jsoncpp
|
|
||||||
, leveldb
|
|
||||||
, cryptopp
|
|
||||||
, libcpuid
|
|
||||||
, miniupnpc
|
|
||||||
, libjson_rpc_cpp
|
|
||||||
, curl
|
|
||||||
, libmicrohttpd
|
|
||||||
, mesa
|
|
||||||
|
|
||||||
, withOpenCL ? false
|
|
||||||
, opencl-headers ? null
|
|
||||||
, ocl-icd ? null
|
|
||||||
|
|
||||||
, withGUI ? false
|
|
||||||
, qtwebengine ? null
|
|
||||||
, qtbase ? null
|
|
||||||
, qtdeclarative ? null
|
|
||||||
|
|
||||||
, withProfiling ? false
|
|
||||||
, gperftools ? null
|
|
||||||
|
|
||||||
, withEVMJIT ? false
|
|
||||||
, llvm ? null
|
|
||||||
, zlib ? null
|
|
||||||
, ncurses ? null
|
|
||||||
|
|
||||||
, extraCmakeFlags ? []
|
|
||||||
}:
|
|
||||||
|
|
||||||
assert withOpenCL -> (opencl-headers != null) && (ocl-icd != null);
|
|
||||||
assert withGUI -> (qtwebengine != null) && (qtbase != null) && (qtdeclarative != null);
|
|
||||||
assert withProfiling -> (gperftools != null);
|
|
||||||
assert withEVMJIT -> (llvm != null) && (zlib != null) && (ncurses != null);
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "cpp-ethereum-${version}";
|
|
||||||
version = "1.2.9";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = https://github.com/ethereum/webthree-umbrella.git;
|
|
||||||
rev = "850479b159a0bfa316fd261ab96b0a043acd766c";
|
|
||||||
sha256 = "0k8w8gqzy71x77p0p85r38gfdnzrlzk2yvb3ablml9ppg4qb4ch5";
|
|
||||||
};
|
|
||||||
|
|
||||||
cmakeFlags = with stdenv.lib; concatStringsSep " " (flatten [
|
|
||||||
"-DGUI=${toString withGUI}"
|
|
||||||
"-DETHASHCL=${toString withOpenCL}"
|
|
||||||
"-DPROFILING=${toString withProfiling}"
|
|
||||||
"-DEVMJIT=${toString withEVMJIT}"
|
|
||||||
(optional withOpenCL [
|
|
||||||
"-DCMAKE_INCLUDE_PATH=${opencl-headers}/include"
|
|
||||||
"-DCMAKE_LIBRARY_PATH=${ocl-icd}/lib"
|
|
||||||
])
|
|
||||||
(optional withEVMJIT "-DCMAKE_PREFIX_PATH=${llvm}")
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = with stdenv.lib; [
|
|
||||||
cmake
|
|
||||||
boost
|
|
||||||
gmp
|
|
||||||
jsoncpp
|
|
||||||
leveldb
|
|
||||||
cryptopp
|
|
||||||
libcpuid
|
|
||||||
miniupnpc
|
|
||||||
libjson_rpc_cpp
|
|
||||||
curl
|
|
||||||
libmicrohttpd
|
|
||||||
mesa
|
|
||||||
] ++ optionals withOpenCL [ opencl-headers ocl-icd ]
|
|
||||||
++ optionals withGUI [ qtwebengine qtbase qtdeclarative ]
|
|
||||||
++ optional withProfiling gperftools
|
|
||||||
++ optionals withEVMJIT [ llvm zlib ncurses ];
|
|
||||||
|
|
||||||
runPath = with stdenv.lib; (makeLibraryPath (flatten [ 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
|
|
||||||
'';
|
|
||||||
|
|
||||||
dontStrip = true;
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
decription = "Umbrella project for the Ethereum C++ implementation";
|
|
||||||
homepage = https://github.com/ethereum/webthree-umbrella.git;
|
|
||||||
license = licenses.gpl3;
|
|
||||||
maintainers = with maintainers; [ artuuge ];
|
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -12174,15 +12174,7 @@ in
|
||||||
|
|
||||||
convchain = callPackage ../tools/graphics/convchain {};
|
convchain = callPackage ../tools/graphics/convchain {};
|
||||||
|
|
||||||
cpp_ethereum = callPackage ../applications/misc/webthree-umbrella {
|
cpp_ethereum = callPackage ../applications/misc/cpp-ethereum { };
|
||||||
withOpenCL = true;
|
|
||||||
|
|
||||||
# withEVMJIT = true;
|
|
||||||
# inherit (pkgs.llvmPackages_38) llvm;
|
|
||||||
|
|
||||||
# withGUI = true;
|
|
||||||
# inherit (pkgs.qt5) qtwebengine qtbase qtdeclarative;
|
|
||||||
};
|
|
||||||
|
|
||||||
csdp = callPackage ../applications/science/math/csdp {
|
csdp = callPackage ../applications/science/math/csdp {
|
||||||
liblapack = liblapackWithoutAtlas;
|
liblapack = liblapackWithoutAtlas;
|
||||||
|
|
Loading…
Reference in a new issue