From efd93313337e4ed687a938d18bc298b96e762e16 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 28 Feb 2017 17:11:32 +0100 Subject: [PATCH] libjson-rpc-cpp: 0.6.0 -> 0.7.0, fix build --- .../libraries/libjson-rpc-cpp/default.nix | 36 ++++++++----------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/pkgs/development/libraries/libjson-rpc-cpp/default.nix b/pkgs/development/libraries/libjson-rpc-cpp/default.nix index ca60f1570bc4..6487e9267bee 100644 --- a/pkgs/development/libraries/libjson-rpc-cpp/default.nix +++ b/pkgs/development/libraries/libjson-rpc-cpp/default.nix @@ -1,26 +1,21 @@ -{ stdenv -, fetchgit -, cmake -, jsoncpp -, argtable -, curl -, libmicrohttpd -, doxygen -, catch +{ stdenv, fetchFromGitHub, cmake, jsoncpp, argtable, curl, libmicrohttpd +, doxygen, catch, pkgconfig, git, gcc6 }: + stdenv.mkDerivation rec { name = "libjson-rpc-cpp-${version}"; - version = "0.6.0"; + version = "0.7.0"; - src = fetchgit { - url = https://github.com/cinemast/libjson-rpc-cpp.git; - sha256 = "00fxxisg89zgg1wq047n8r8ws48jx35x3s6bbym4kg7dkxv9vv9f"; - rev = "c6e3d7195060774bf95afc6df9c9588922076d3e"; + src = fetchFromGitHub { + owner = "cinemast"; + repo = "libjson-rpc-cpp"; + sha256 = "07bg4nyvx0yyhy8c4x9i22kwqpx5jlv36dvpabgbb46ayyndhr7a"; + rev = "v${version}"; }; - hardeningDisable = [ "format" ]; + NIX_CFLAGS_COMPILE = "-I${catch}/include/catch"; - patchPhase = '' + postPatch = '' for f in cmake/FindArgtable.cmake \ src/stubgenerator/stubgenerator.cpp \ src/stubgenerator/stubgeneratorfactory.cpp @@ -38,13 +33,13 @@ stdenv.mkDerivation rec { 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" + q="$p:${stdenv.lib.makeLibraryPath [ gcc6 jsoncpp argtable libmicrohttpd curl ]}:$out/lib" patchelf --set-rpath $q $1 } @@ -54,12 +49,11 @@ stdenv.mkDerivation rec { for f in Install/lib/*.so* $(find Install/bin -executable -type f); do fixRunPath $f done - + cp -r Install/* $out ''; - dontStrip = true; - + nativeBuildInputs = [ pkgconfig gcc6 ]; buildInputs = [ cmake jsoncpp argtable curl libmicrohttpd doxygen catch ]; meta = with stdenv.lib; { diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 318415b7512f..f790bbf29ed0 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -75,6 +75,7 @@ doNotDisplayTwice rec { libcap_manpages = libcap.doc; # added 2016-04-29 libcap_pam = if stdenv.isLinux then libcap.pam else null; # added 2016-04-29 libcap_progs = libcap.out; # added 2016-04-29 + libjson_rpc_cpp = libjson-rpc-cpp; # added 2017-02-28 libtidy = html-tidy; # added 2014-12-21 links = links2; # added 2016-01-31 lttngTools = lttng-tools; # added 2014-07-31 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 97919a701771..10c06d2e1735 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8427,7 +8427,7 @@ with pkgs; libjreen = callPackage ../development/libraries/libjreen { }; - libjson_rpc_cpp = callPackage ../development/libraries/libjson-rpc-cpp { }; + libjson-rpc-cpp = callPackage ../development/libraries/libjson-rpc-cpp { }; libjson_rpc_cpp_0_2_1 = callPackage ../development/libraries/libjson-rpc-cpp/0.2.1 { };