git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #22404 from cpages/jsoncpp

jsoncpp: update and drop old version

commitf9c684e1528c6e595580f4c6cdb3d6f22ae6a2e4 authorThomas Tuegel <ttuegel@gmail.com> dateSat 4 Feb 2017, 20:06 (10 years ago) parentf050f3b67dcb6a
3 files changed+31−66
pkgs/development/libraries/jsoncpp/1.6.5/default.nix−48 pkgs/development/libraries/jsoncpp/default.nix+31−16 pkgs/top-level/all-packages.nix−2
pkgs/development/libraries/jsoncpp/1.6.5/default.nixdeleted−48
@@ -1,48 +0,0 @@
1−{ stdenv, fetchFromGitHub, cmake, python }:
2−
3−stdenv.mkDerivation rec {
4− name = "jsoncpp-${version}";
5− version = "1.6.5";
6−
7− src = fetchFromGitHub {
8− owner = "open-source-parsers";
9− repo = "jsoncpp";
10− rev = version;
11− sha256 = "08y54n4v3q18ik8iv8zyziava3x130ilzf1l3qli3vjwf6l42fm0";
12− };
13−
14− /* During darwin bootstrap, we have a cp that doesn't understand the
15− * --reflink=auto flag, which is used in the default unpackPhase for dirs
16− */
17− unpackPhase = ''
18− cp -a ${src} ${src.name}
19− chmod -R +w ${src.name}
20− export sourceRoot=${src.name}
21− '';
22−
23− # Hack to be able to run the test, broken because we use
24− # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install
25− preBuild = ''
26− export LD_LIBRARY_PATH="`pwd`/src/lib_json:$LD_LIBRARY_PATH"
27− '';
28−
29− nativeBuildInputs = [ cmake python ];
30−
31− CXXFLAGS = "-Wno-shift-negative-value";
32−
33− cmakeFlags = [
34− "-DJSONCPP_LIB_BUILD_SHARED=ON"
35− "-DJSONCPP_LIB_BUILD_STATIC=OFF"
36− "-DJSONCPP_WITH_CMAKE_PACKAGE=ON"
37− ];
38−
39− meta = {
40− inherit version;
41− homepage = https://github.com/open-source-parsers/jsoncpp;
42− description = "A simple API to manipulate JSON data in C++";
43− maintainers = with stdenv.lib.maintainers; [ ttuegel cpages ];
44− platforms = stdenv.lib.platforms.all;
45− license = stdenv.lib.licenses.mit;
46− branch = "1.6";
47− };
48−}
pkgs/development/libraries/jsoncpp/default.nix+31−16
@@ -1,34 +1,49 @@
11{ stdenv
2−, fetchgit
2+, fetchFromGitHub
33, cmake
44, python
55}:
66stdenv.mkDerivation rec {
77 name = "jsoncpp-${version}";
8− version = "1.7.2";
8+ version = "1.8.0";
99
10− src = fetchgit {
11− url = https://github.com/open-source-parsers/jsoncpp.git;
12− sha256 = "04w4cfmvyv52rpqhc370ln8rhlsrr515778bixhgafqbp3p4x34k";
13− rev = "c8054483f82afc3b4db7efe4e5dc034721649ec8";
10+ src = fetchFromGitHub {
11+ owner = "open-source-parsers";
12+ repo = "jsoncpp";
13+ rev = version;
14+ sha256 = "1lg22zrjnl10x1bw0wfz72xd2kfbzynyggk8vdwd89mp1g8xjl9d";
1415 };
1516
16− configurePhase = ''
17− mkdir -p Build
18− pushd Build
17+ /* During darwin bootstrap, we have a cp that doesn't understand the
18+ * --reflink=auto flag, which is used in the default unpackPhase for dirs
19+ */
20+ unpackPhase = ''
21+ cp -a ${src} ${src.name}
22+ chmod -R +w ${src.name}
23+ export sourceRoot=${src.name}
24+ '';
1925
20− mkdir -p $out
21− cmake .. -DCMAKE_INSTALL_PREFIX=$out \
22− -DBUILD_SHARED_LIBS=ON \
23− -DCMAKE_BUILD_TYPE=Release
24− '';
26+ # Hack to be able to run the test, broken because we use
27+ # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install
28+ preBuild = if stdenv.isDarwin then ''
29+ export DYLD_LIBRARY_PATH="`pwd`/src/lib_json:$DYLD_LIBRARY_PATH"
30+ '' else ''
31+ export LD_LIBRARY_PATH="`pwd`/src/lib_json:$LD_LIBRARY_PATH"
32+ '';
2533
26− buildInputs = [ cmake python ];
34+ nativeBuildInputs = [ cmake python ];
35+
36+ cmakeFlags = [
37+ "-DBUILD_SHARED_LIBS=ON"
38+ "-DBUILD_STATIC_LIBS=OFF"
39+ ];
2740
2841 meta = with stdenv.lib; {
42+ inherit version;
2943 homepage = https://github.com/open-source-parsers/jsoncpp;
3044 description = "A C++ library for interacting with JSON.";
45+ maintainers = with maintainers; [ ttuegel cpages ];
3146 license = licenses.mit;
32− platforms = platforms.linux;
47+ platforms = platforms.all;
3348 };
3449}
pkgs/top-level/all-packages.nix−2
@@ -7752,8 +7752,6 @@ with pkgs;
77527752
77537753 jsoncpp = callPackage ../development/libraries/jsoncpp { };
77547754
7755− jsoncpp_1_6_5 = callPackage ../development/libraries/jsoncpp/1.6.5 { };
7756−
77577755 jsonnet = callPackage ../development/compilers/jsonnet { };
77587756
77597757 libjson = callPackage ../development/libraries/libjson { };