at 23.11-beta 39 lines 1.2 kB view raw
1{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "json-c"; 5 version = "0.16"; 6 7 src = fetchFromGitHub { 8 owner = "json-c"; 9 repo = "json-c"; 10 rev = "json-c-0.16-20220414"; 11 sha256 = "sha256-KbnUWLgpg6/1wvXhUoYswyqDcgiwEcvgaWCPjNcX20o="; 12 }; 13 14 patches = [ 15 # needed for emscripten, which uses LLVM 15+ 16 (fetchpatch { 17 url = "https://github.com/json-c/json-c/commit/6eca65617aacd19f4928acd5766b8dd20eda0b34.patch"; 18 sha256 = "sha256-fyugX+HgYlt/4AVtfNDaKS+blyUt8JYTNqkmhURb9dk="; 19 }) 20 ]; 21 22 outputs = [ "out" "dev" ]; 23 24 nativeBuildInputs = [ cmake ]; 25 26 meta = with lib; { 27 description = "A JSON implementation in C"; 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 homepage = "https://github.com/json-c/json-c/wiki"; 35 maintainers = with maintainers; [ lovek323 ]; 36 platforms = platforms.unix; 37 license = licenses.mit; 38 }; 39}