core/pkgs/by-name/ja/jansson/default.nix

33 lines
884 B
Nix
Raw Normal View History

2024-05-02 00:46:19 +00:00
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "jansson";
version = "2.14";
src = fetchFromGitHub {
owner = "akheron";
repo = "jansson";
rev = "v${version}";
sha256 = "sha256-FQgy2+g3AyRVJeniqPQj0KNeHgPdza2pmEIXqSyYry4=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
# networkmanager relies on libjansson.so:
# https://github.com/NixOS/nixpkgs/pull/176302#issuecomment-1150239453
2024-05-13 21:24:10 +00:00
"-DJANSSON_BUILD_SHARED_LIBS=${
if stdenv.hostPlatform.isStatic then "OFF" else "ON"
}"
2024-05-02 00:46:19 +00:00
];
meta = with lib; {
homepage = "https://github.com/akheron/jansson";
description = "C library for encoding, decoding and manipulating JSON data";
changelog = "https://github.com/akheron/jansson/raw/v${version}/CHANGES";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ ];
};
}