1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 rev = "json-c-0.16-20220414";
11 sha256 = "sha256-KbnUWLgpg6/1wvXhUoYswyqDcgiwEcvgaWCPjNcX20o=";
15 # needed for emscripten, which uses LLVM 15+
17 url = "https://github.com/json-c/json-c/commit/6eca65617aacd19f4928acd5766b8dd20eda0b34.patch";
18 sha256 = "sha256-fyugX+HgYlt/4AVtfNDaKS+blyUt8JYTNqkmhURb9dk=";
22 outputs = [ "out" "dev" ];
24 nativeBuildInputs = [ cmake ];
27 description = "A JSON implementation in C";
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
34 homepage = "https://github.com/json-c/json-c/wiki";
35 maintainers = with maintainers; [ lovek323 ];
36 platforms = platforms.unix;
37 license = licenses.mit;