lol
at 17.09-beta 43 lines 1.1 kB view raw
1{ stdenv, lib, fetchFromGitHub, fetchpatch, jansson }: 2 3stdenv.mkDerivation rec { 4 name = "jshon-20140712"; 5 6 rev = "a61d7f2f85f4627bc3facdf951746f0fd62334b7"; 7 sha256 = "b0365e58553b9613a5636545c5bfd4ad05ab5024f192e1cb1d1824bae4e1a380"; 8 9 src = fetchFromGitHub { 10 inherit rev sha256; 11 owner = "keenerd"; 12 repo = "jshon"; 13 }; 14 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 24 buildInputs = [ jansson ]; 25 26 patchPhase = 27 '' 28 substituteInPlace Makefile --replace "/usr/" "/" 29 ''; 30 31 preInstall = 32 '' 33 export DESTDIR=$out 34 ''; 35 36 meta = with lib; { 37 homepage = http://kmkeen.com/jshon; 38 description = "JSON parser designed for maximum convenience within the shell"; 39 license = licenses.free; 40 platforms = platforms.all; 41 maintainers = with maintainers; [ rushmorem ]; 42 }; 43}