at 18.03-beta 35 lines 1.2 kB view raw
1{ stdenv, fetchurl, autoreconfHook }: 2 3stdenv.mkDerivation rec { 4 name = "json-c-0.12.1"; 5 src = fetchurl { 6 url = "https://s3.amazonaws.com/json-c_releases/releases/${name}-nodoc.tar.gz"; 7 sha256 = "148jkvpnxmg1fwwigp0nq9qbd5vzpnmgiw3y34w7k6fymalpsqas"; 8 }; 9 10 outputs = [ "out" "dev" ]; 11 12 nativeBuildInputs = [ autoreconfHook ]; # won't configure without it, no idea why 13 14 # probably OK after update: https://github.com/json-c/json-c/pull/365 15 NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; 16 17 # compatibility hack (for mypaint at least) 18 postInstall = '' 19 ln -s json-c.pc "$dev/lib/pkgconfig/json.pc" 20 ''; 21 22 meta = with stdenv.lib; { 23 description = "A JSON implementation in C"; 24 homepage = https://github.com/json-c/json-c/wiki; 25 maintainers = with maintainers; [ lovek323 ]; 26 platforms = platforms.unix; 27 28 longDescription = '' 29 JSON-C implements a reference counting object model that allows you to 30 easily construct JSON objects in C, output them as JSON formatted strings 31 and parse JSON formatted strings back into the C representation of JSON 32 objects. 33 ''; 34 }; 35}