summaryrefslogtreecommitdiff
path: root/pkgs/applications/misc/cpp-ethereum/default.nix
diff options
context:
space:
mode:
authorNicolas B. Pierron <nicolas.b.pierron@gmail.com>2016-10-31 15:16:29 +0000
committerNicolas B. Pierron <nicolas.b.pierron@gmail.com>2016-10-31 15:16:29 +0000
commit59b5bbeae91109007e36a269a94cccc865dc5175 (patch)
tree1ee3d18aedace6d66034ea72fea571d20d8d0fee /pkgs/applications/misc/cpp-ethereum/default.nix
parentDo not use old stdenv version in faust wrap functions. (-8 alias, -15 unpatch... (diff)
parentMerge pull request #19675 from edwtjo/dictd-touchup (diff)
downloadnixpkgs-gitlab.intr/security-updates.tar.gz
Merge branch master into security-updatesorigin/security-updatesgitlab.intr/security-updates
This merge mostly take the changes made to the master branch. Some conflict happen in top-level/default.nix due to a reformating of the code of which is computing the fix-point. This merge fixes these issues by adding the pkgsIndex argument, needed to re-evaluate the fix-point with another set of packages, and also re-add the second fix-point made to support the dependencies.
Diffstat (limited to 'pkgs/applications/misc/cpp-ethereum/default.nix')
-rw-r--r--pkgs/applications/misc/cpp-ethereum/default.nix84
1 files changed, 84 insertions, 0 deletions
diff --git a/pkgs/applications/misc/cpp-ethereum/default.nix b/pkgs/applications/misc/cpp-ethereum/default.nix
new file mode 100644
index 000000000000..3cc334c6765b
--- /dev/null
+++ b/pkgs/applications/misc/cpp-ethereum/default.nix
@@ -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;
+ };
+}