diff options
author | artuuge <artuuge@gmail.com> | 2016-06-28 08:41:24 +0200 |
---|---|---|
committer | artuuge <artuuge@gmail.com> | 2016-07-01 19:14:00 +0200 |
commit | 83fd63995af5447a25ae79494b7ba29cd9ff0441 (patch) | |
tree | dc056dc1a4f4c84d11887615ac35896396da50d3 /pkgs/development/libraries | |
parent | 7d67a4da99b1c83ae7c9405d8f35a9727778982e (diff) | |
download | nixpkgs-83fd63995af5447a25ae79494b7ba29cd9ff0441.tar nixpkgs-83fd63995af5447a25ae79494b7ba29cd9ff0441.tar.gz nixpkgs-83fd63995af5447a25ae79494b7ba29cd9ff0441.tar.bz2 nixpkgs-83fd63995af5447a25ae79494b7ba29cd9ff0441.tar.lz nixpkgs-83fd63995af5447a25ae79494b7ba29cd9ff0441.tar.xz nixpkgs-83fd63995af5447a25ae79494b7ba29cd9ff0441.tar.zst nixpkgs-83fd63995af5447a25ae79494b7ba29cd9ff0441.zip |
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
Diffstat (limited to 'pkgs/development/libraries')
4 files changed, 159 insertions, 56 deletions
diff --git a/pkgs/development/libraries/jsoncpp/1.6.5/default.nix b/pkgs/development/libraries/jsoncpp/1.6.5/default.nix new file mode 100644 index 00000000000..53df8d6e7cf --- /dev/null +++ b/pkgs/development/libraries/jsoncpp/1.6.5/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchFromGitHub, cmake, python }: + +stdenv.mkDerivation rec { + name = "jsoncpp-${version}"; + version = "1.6.5"; + + src = fetchFromGitHub { + owner = "open-source-parsers"; + repo = "jsoncpp"; + rev = version; + sha256 = "08y54n4v3q18ik8iv8zyziava3x130ilzf1l3qli3vjwf6l42fm0"; + }; + + /* During darwin bootstrap, we have a cp that doesn't understand the + * --reflink=auto flag, which is used in the default unpackPhase for dirs + */ + unpackPhase = '' + cp -a ${src} ${src.name} + chmod -R +w ${src.name} + export sourceRoot=${src.name} + ''; + + # Hack to be able to run the test, broken because we use + # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install + preBuild = '' + export LD_LIBRARY_PATH="`pwd`/src/lib_json:$LD_LIBRARY_PATH" + ''; + + nativeBuildInputs = [ cmake python ]; + + CXXFLAGS = "-Wno-shift-negative-value"; + + cmakeFlags = [ + "-DJSONCPP_LIB_BUILD_SHARED=ON" + "-DJSONCPP_LIB_BUILD_STATIC=OFF" + "-DJSONCPP_WITH_CMAKE_PACKAGE=ON" + ]; + + meta = { + inherit version; + homepage = https://github.com/open-source-parsers/jsoncpp; + description = "A simple API to manipulate JSON data in C++"; + maintainers = with stdenv.lib.maintainers; [ ttuegel page ]; + platforms = stdenv.lib.platforms.all; + license = stdenv.lib.licenses.mit; + branch = "1.6"; + }; +} diff --git a/pkgs/development/libraries/jsoncpp/default.nix b/pkgs/development/libraries/jsoncpp/default.nix index 53df8d6e7cf..5c4c4a693df 100644 --- a/pkgs/development/libraries/jsoncpp/default.nix +++ b/pkgs/development/libraries/jsoncpp/default.nix @@ -1,48 +1,34 @@ -{ stdenv, fetchFromGitHub, cmake, python }: - +{ stdenv +, fetchgit +, cmake +, python +}: stdenv.mkDerivation rec { name = "jsoncpp-${version}"; - version = "1.6.5"; + version = "1.7.2"; - src = fetchFromGitHub { - owner = "open-source-parsers"; - repo = "jsoncpp"; - rev = version; - sha256 = "08y54n4v3q18ik8iv8zyziava3x130ilzf1l3qli3vjwf6l42fm0"; + src = fetchgit { + url = https://github.com/open-source-parsers/jsoncpp.git; + sha256 = "04w4cfmvyv52rpqhc370ln8rhlsrr515778bixhgafqbp3p4x34k"; + rev = "c8054483f82afc3b4db7efe4e5dc034721649ec8"; }; - /* During darwin bootstrap, we have a cp that doesn't understand the - * --reflink=auto flag, which is used in the default unpackPhase for dirs - */ - unpackPhase = '' - cp -a ${src} ${src.name} - chmod -R +w ${src.name} - export sourceRoot=${src.name} - ''; - - # Hack to be able to run the test, broken because we use - # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install - preBuild = '' - export LD_LIBRARY_PATH="`pwd`/src/lib_json:$LD_LIBRARY_PATH" - ''; - - nativeBuildInputs = [ cmake python ]; + configurePhase = '' + mkdir -p Build + pushd Build - CXXFLAGS = "-Wno-shift-negative-value"; + mkdir -p $out + cmake .. -DCMAKE_INSTALL_PREFIX=$out \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release + ''; - cmakeFlags = [ - "-DJSONCPP_LIB_BUILD_SHARED=ON" - "-DJSONCPP_LIB_BUILD_STATIC=OFF" - "-DJSONCPP_WITH_CMAKE_PACKAGE=ON" - ]; + buildInputs = [ cmake python ]; - meta = { - inherit version; + meta = with stdenv.lib; { homepage = https://github.com/open-source-parsers/jsoncpp; - description = "A simple API to manipulate JSON data in C++"; - maintainers = with stdenv.lib.maintainers; [ ttuegel page ]; - platforms = stdenv.lib.platforms.all; - license = stdenv.lib.licenses.mit; - branch = "1.6"; + description = "A C++ library for interacting with JSON."; + license = licenses.mit; + platforms = platforms.linux; }; } diff --git a/pkgs/development/libraries/libjson-rpc-cpp/0.2.1/default.nix b/pkgs/development/libraries/libjson-rpc-cpp/0.2.1/default.nix new file mode 100644 index 00000000000..5e0a8560110 --- /dev/null +++ b/pkgs/development/libraries/libjson-rpc-cpp/0.2.1/default.nix @@ -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; + }; +} diff --git a/pkgs/development/libraries/libjson-rpc-cpp/default.nix b/pkgs/development/libraries/libjson-rpc-cpp/default.nix index 5e0a8560110..2cfede1eb6e 100644 --- a/pkgs/development/libraries/libjson-rpc-cpp/default.nix +++ b/pkgs/development/libraries/libjson-rpc-cpp/default.nix @@ -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 + src = fetchgit { + url = https://github.com/cinemast/libjson-rpc-cpp.git; + sha256 = "00fxxisg89zgg1wq047n8r8ws48jx35x3s6bbym4kg7dkxv9vv9f"; + rev = "c6e3d7195060774bf95afc6df9c9588922076d3e"; + }; -stdenv.mkDerivation { - name = "${basename}-${version}"; + 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 - src = fetchurl { - url = "https://github.com/cinemast/${basename}/archive/${version}.tar.gz"; - sha256 = "1pc9nn4968qkda8vr4f9dijn2fcldm8i0ymwmql29h4cl5ghdnpw"; - }; + sed -i -re 's#MATCHES "jsoncpp"#MATCHES ".*/jsoncpp/json$"#g' cmake/FindJsoncpp.cmake + ''; + + configurePhase = '' + mkdir -p Build/Install + pushd Build + + 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 - buildInputs = [ cmake curl ]; + 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 + ''; - NIX_LDFLAGS = "-lpthread"; - enableParallelBuilding = true; - doCheck = true; + dontStrip = true; - checkPhase = "LD_LIBRARY_PATH=out/ ctest"; + buildInputs = [ cmake jsoncpp argtable curl libmicrohttpd doxygen catch ]; - meta = { + 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; }; } |