2022-06-04 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2013-05-11 21:34:07 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-20 14:15:21 +00:00
|
|
|
pname = "jansson";
|
2022-06-04 04:20:00 +00:00
|
|
|
version = "2.14";
|
2013-05-11 21:34:07 +00:00
|
|
|
|
2022-06-04 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "akheron";
|
|
|
|
repo = "jansson";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-FQgy2+g3AyRVJeniqPQj0KNeHgPdza2pmEIXqSyYry4=";
|
2013-05-11 21:34:07 +00:00
|
|
|
};
|
|
|
|
|
2022-06-04 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-06-27 07:19:58 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
# networkmanager relies on libjansson.so:
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/176302#issuecomment-1150239453
|
|
|
|
"-DJANSSON_BUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
|
|
|
];
|
2022-06-09 17:49:11 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2022-06-04 04:20:00 +00:00
|
|
|
homepage = "https://github.com/akheron/jansson";
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "C library for encoding, decoding and manipulating JSON data";
|
2022-06-04 04:20:00 +00:00
|
|
|
changelog = "https://github.com/akheron/jansson/raw/v${version}/CHANGES";
|
2015-05-01 21:36:51 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
2022-06-04 04:20:00 +00:00
|
|
|
maintainers = [ maintainers.marsam ];
|
2013-05-11 21:34:07 +00:00
|
|
|
};
|
|
|
|
}
|