at 24.11-pre 30 lines 872 B view raw
1{ lib, stdenv, fetchFromGitHub, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "jansson"; 5 version = "2.14"; 6 7 src = fetchFromGitHub { 8 owner = "akheron"; 9 repo = "jansson"; 10 rev = "v${version}"; 11 sha256 = "sha256-FQgy2+g3AyRVJeniqPQj0KNeHgPdza2pmEIXqSyYry4="; 12 }; 13 14 nativeBuildInputs = [ cmake ]; 15 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 ]; 21 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 = [ ]; 29 }; 30}