Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / jansson / default.nix
blobfbc9a676a85cd9bde7b94fa43436d93f04806baf
1 { lib, stdenv, fetchFromGitHub, cmake }:
3 stdenv.mkDerivation rec {
4   pname = "jansson";
5   version = "2.14";
7   src = fetchFromGitHub {
8     owner = "akheron";
9     repo = "jansson";
10     rev = "v${version}";
11     sha256 = "sha256-FQgy2+g3AyRVJeniqPQj0KNeHgPdza2pmEIXqSyYry4=";
12   };
14   nativeBuildInputs = [ cmake ];
16   cmakeFlags = [
17     # networkmanager relies on libjansson.so:
18     #   https://github.com/NixOS/nixpkgs/pull/176302#issuecomment-1150239453
19     "-DJANSSON_BUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
20   ];
22   meta = with lib; {
23     homepage = "https://github.com/akheron/jansson";
24     description = "C library for encoding, decoding and manipulating JSON data";
25     changelog = "https://github.com/akheron/jansson/raw/v${version}/CHANGES";
26     license = licenses.mit;
27     platforms = platforms.all;
28     maintainers = [ maintainers.marsam ];
29   };