From 83fd63995af5447a25ae79494b7ba29cd9ff0441 Mon Sep 17 00:00:00 2001 From: artuuge Date: Tue, 28 Jun 2016 08:41:24 +0200 Subject: 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 --- .../libraries/jsoncpp/1.6.5/default.nix | 48 +++++++++++++++++ pkgs/development/libraries/jsoncpp/default.nix | 60 +++++++++------------- 2 files changed, 71 insertions(+), 37 deletions(-) create mode 100644 pkgs/development/libraries/jsoncpp/1.6.5/default.nix (limited to 'pkgs/development/libraries/jsoncpp') 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; }; } -- cgit 1.4.1