2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, # this also disables building tests.
|
|
|
|
# on static windows cross-compile they fail to build
|
|
|
|
doCheck ? with stdenv.hostPlatform; !(isWindows && isStatic)
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libconfig";
|
2021-07-03 03:11:41 +00:00
|
|
|
version = "1.7.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://hyperrealm.github.io/${pname}/dist/${pname}-${version}.tar.gz";
|
2021-07-03 03:11:41 +00:00
|
|
|
sha256 = "sha256-VFFm1srAN3RDgdHpzFpUBQlOe/rRakEWmbz/QLuzHuc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
inherit doCheck;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
configureFlags = lib.optional (stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isStatic) "--disable-examples"
|
|
|
|
++ lib.optional (!doCheck) "--disable-tests";
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals (!doCheck) [ "-DBUILD_TESTS:BOOL=OFF" ];
|
2021-04-22 02:08:21 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.hyperrealm.com/libconfig";
|
|
|
|
description = "A simple library for processing structured configuration files";
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = [ maintainers.goibhniu ];
|
2022-12-17 10:02:37 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|