2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-19 00:13:47 +00:00
|
|
|
pname = "json-c";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "0.16";
|
2020-11-19 00:13:47 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "json-c";
|
|
|
|
repo = "json-c";
|
|
|
|
rev = "json-c-0.16-20220414";
|
|
|
|
sha256 = "sha256-KbnUWLgpg6/1wvXhUoYswyqDcgiwEcvgaWCPjNcX20o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = [
|
|
|
|
# needed for emscripten, which uses LLVM 15+
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/json-c/json-c/commit/6eca65617aacd19f4928acd5766b8dd20eda0b34.patch";
|
|
|
|
sha256 = "sha256-fyugX+HgYlt/4AVtfNDaKS+blyUt8JYTNqkmhURb9dk=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A JSON implementation in C";
|
|
|
|
longDescription = ''
|
|
|
|
JSON-C implements a reference counting object model that allows you to
|
|
|
|
easily construct JSON objects in C, output them as JSON formatted strings
|
|
|
|
and parse JSON formatted strings back into the C representation of JSON
|
|
|
|
objects.
|
|
|
|
'';
|
2022-06-26 10:26:21 +00:00
|
|
|
homepage = "https://github.com/json-c/json-c/wiki";
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|