cpp_ethereum: init at 1.2.9

jsoncpp: 1.6.5 -> 1.7.2
libjson_rpc_cpp: 0.2.1 -> 0.6.0
argtable: init at 3.0.1
libcpuid: init at 0.2.2
This commit is contained in:
artuuge
2016-06-28 08:41:24 +02:00
parent 7d67a4da99
commit 83fd63995a
8 changed files with 437 additions and 57 deletions

View File

@@ -0,0 +1,30 @@
{ stdenv, fetchurl, cmake, curl }:
let
basename = "libjson-rpc-cpp";
version = "0.2.1";
in
stdenv.mkDerivation {
name = "${basename}-${version}";
src = fetchurl {
url = "https://github.com/cinemast/${basename}/archive/${version}.tar.gz";
sha256 = "1pc9nn4968qkda8vr4f9dijn2fcldm8i0ymwmql29h4cl5ghdnpw";
};
buildInputs = [ cmake curl ];
NIX_LDFLAGS = "-lpthread";
enableParallelBuilding = true;
doCheck = true;
checkPhase = "LD_LIBRARY_PATH=out/ ctest";
meta = {
description = "C++ framework for json-rpc (json remote procedure call)";
homepage = https://github.com/cinemast/libjson-rpc-cpp;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
};
}

View File

@@ -1,30 +1,69 @@
{ stdenv, fetchurl, cmake, curl }:
{ stdenv
, fetchgit
, cmake
, jsoncpp
, argtable
, curl
, libmicrohttpd
, doxygen
, catch
}:
stdenv.mkDerivation rec {
name = "libjson-rpc-cpp-${version}";
version = "0.6.0";
let
basename = "libjson-rpc-cpp";
version = "0.2.1";
in
stdenv.mkDerivation {
name = "${basename}-${version}";
src = fetchurl {
url = "https://github.com/cinemast/${basename}/archive/${version}.tar.gz";
sha256 = "1pc9nn4968qkda8vr4f9dijn2fcldm8i0ymwmql29h4cl5ghdnpw";
src = fetchgit {
url = https://github.com/cinemast/libjson-rpc-cpp.git;
sha256 = "00fxxisg89zgg1wq047n8r8ws48jx35x3s6bbym4kg7dkxv9vv9f";
rev = "c6e3d7195060774bf95afc6df9c9588922076d3e";
};
buildInputs = [ cmake curl ];
patchPhase = ''
for f in cmake/FindArgtable.cmake \
src/stubgenerator/stubgenerator.cpp \
src/stubgenerator/stubgeneratorfactory.cpp
do
sed -i -re 's/argtable2/argtable3/g' $f
done
NIX_LDFLAGS = "-lpthread";
enableParallelBuilding = true;
doCheck = true;
sed -i -re 's#MATCHES "jsoncpp"#MATCHES ".*/jsoncpp/json$"#g' cmake/FindJsoncpp.cmake
'';
checkPhase = "LD_LIBRARY_PATH=out/ ctest";
configurePhase = ''
mkdir -p Build/Install
pushd Build
meta = {
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/Install \
-DCMAKE_BUILD_TYPE=Release
'';
installPhase = ''
mkdir -p $out
function fixRunPath {
p=$(patchelf --print-rpath $1)
q="$p:${stdenv.lib.makeLibraryPath [ stdenv.cc.cc jsoncpp argtable libmicrohttpd curl ]}:$out/lib"
patchelf --set-rpath $q $1
}
make install
sed -i -re "s#-([LI]).*/Build/Install(.*)#-\1$out\2#g" Install/lib/pkgconfig/*.pc
for f in Install/lib/*.so* $(find Install/bin -executable -type f); do
fixRunPath $f
done
cp -r Install/* $out
'';
dontStrip = true;
buildInputs = [ cmake jsoncpp argtable curl libmicrohttpd doxygen catch ];
meta = with stdenv.lib; {
description = "C++ framework for json-rpc (json remote procedure call)";
homepage = https://github.com/cinemast/libjson-rpc-cpp;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
license = licenses.mit;
platforms = platforms.linux;
};
}