2017-03-10 20:59:38 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, jansson }:
|
2015-02-19 13:17:24 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-03-09 04:38:10 +00:00
|
|
|
name = "jshon-20160111.2";
|
2015-02-19 13:17:24 +00:00
|
|
|
|
|
|
|
rev = "a61d7f2f85f4627bc3facdf951746f0fd62334b7";
|
2018-03-09 04:38:10 +00:00
|
|
|
sha256 = "1053w7jbl90q3p5y34pi4i8an1ddsjzwaib5cfji75ivamc5wdmh";
|
2015-02-19 13:17:24 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit rev sha256;
|
|
|
|
owner = "keenerd";
|
|
|
|
repo = "jshon";
|
|
|
|
};
|
|
|
|
|
2017-03-10 20:59:38 +00:00
|
|
|
patches = [
|
|
|
|
# Fix null termination in read_stream.
|
|
|
|
# https://github.com/keenerd/jshon/issues/53
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/mbrock/jshon/commit/32288dd186573ceb58164f30be1782d4580466d8.patch;
|
|
|
|
sha256 = "04rss2nprl9nqblc7smq0477n54hm801xgnnmvyzni313i1n6vhl";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2015-02-19 13:17:24 +00:00
|
|
|
buildInputs = [ jansson ];
|
|
|
|
|
2017-03-10 20:59:38 +00:00
|
|
|
patchPhase =
|
2015-02-19 13:17:24 +00:00
|
|
|
''
|
|
|
|
substituteInPlace Makefile --replace "/usr/" "/"
|
|
|
|
'';
|
|
|
|
|
2017-03-10 20:59:38 +00:00
|
|
|
preInstall =
|
2015-02-19 13:17:24 +00:00
|
|
|
''
|
|
|
|
export DESTDIR=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = http://kmkeen.com/jshon;
|
2015-04-28 09:54:58 +01:00
|
|
|
description = "JSON parser designed for maximum convenience within the shell";
|
2015-02-19 13:17:24 +00:00
|
|
|
license = licenses.free;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ rushmorem ];
|
|
|
|
};
|
|
|
|
}
|