@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchFromGitHub, jansson }:
1+{ stdenv, lib, fetchFromGitHub, fetchpatch, jansson }:
22
33stdenv.mkDerivation rec {
44 name = "jshon-20140712";
@@ -12,14 +12,23 @@ stdenv.mkDerivation rec {
1212 repo = "jshon";
1313 };
1414
15+ patches = [
16+ # Fix null termination in read_stream.
17+ # https://github.com/keenerd/jshon/issues/53
18+ (fetchpatch {
19+ url = https://github.com/mbrock/jshon/commit/32288dd186573ceb58164f30be1782d4580466d8.patch;
20+ sha256 = "04rss2nprl9nqblc7smq0477n54hm801xgnnmvyzni313i1n6vhl";
21+ })
22+ ];
23+
1524 buildInputs = [ jansson ];
1625
17− patchPhase =
26+ patchPhase =
1827 ''
1928 substituteInPlace Makefile --replace "/usr/" "/"
2029 '';
2130
22− preInstall =
31+ preInstall =
2332 ''
2433 export DESTDIR=$out
2534 '';