jansson: add pkg-config test

This commit is contained in:
seth 2024-06-12 01:01:23 -04:00
parent d75985387e
commit fb10cb8068
No known key found for this signature in database
GPG Key ID: D31BD0D494BBEE86

View File

@ -3,17 +3,18 @@
stdenv,
fetchFromGitHub,
cmake,
testers,
validatePkgConfig,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "jansson";
version = "2.14";
src = fetchFromGitHub {
owner = "akheron";
repo = "jansson";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-FQgy2+g3AyRVJeniqPQj0KNeHgPdza2pmEIXqSyYry4=";
};
@ -28,12 +29,17 @@ stdenv.mkDerivation rec {
"-DJANSSON_BUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
];
passthru = {
tests.pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
};
meta = {
description = "C library for encoding, decoding and manipulating JSON data";
homepage = "https://github.com/akheron/jansson";
changelog = "https://github.com/akheron/jansson/raw/v${src.rev}/CHANGES";
changelog = "https://github.com/akheron/jansson/raw/${finalAttrs.src.rev}/CHANGES";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ getchoo ];
platforms = lib.platforms.all;
pkgConfigModules = [ "jansson" ];
};
}
})