nixpkgs/pkgs/development/libraries/libconfig/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
964 B
Nix
Raw Normal View History

2021-11-22 23:13:21 +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)
}:
stdenv.mkDerivation rec {
2019-03-19 22:32:57 +00:00
pname = "libconfig";
2021-06-21 04:53:25 +00:00
version = "1.7.3";
src = fetchurl {
2019-03-19 22:32:57 +00:00
url = "https://hyperrealm.github.io/${pname}/dist/${pname}-${version}.tar.gz";
2021-06-21 04:53:25 +00:00
sha256 = "sha256-VFFm1srAN3RDgdHpzFpUBQlOe/rRakEWmbz/QLuzHuc=";
};
2021-11-22 23:13:21 +00:00
inherit doCheck;
2019-03-19 22:32:57 +00:00
2021-11-22 23:13:21 +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" ];
meta = with lib; {
homepage = "http://www.hyperrealm.com/libconfig";
description = "A simple library for processing structured configuration files";
license = licenses.lgpl3;
maintainers = [ maintainers.goibhniu ];
2021-11-22 23:13:21 +00:00
platforms = platforms.all;
};
}