diff options
author | Taeer Bar-Yam <taeer@bar-yam.me> | 2021-11-22 18:13:21 -0500 |
---|---|---|
committer | Taeer Bar-Yam <taeer@bar-yam.me> | 2021-11-22 18:13:21 -0500 |
commit | 3af06f553150512b3b3b37627eb135e7cdcd4527 (patch) | |
tree | c9badac13ef941cd272da97354eef5e0321cf065 /pkgs/development/libraries/libconfig | |
parent | ea55e013f0a9735bd384423bc057a3b367a5ce33 (diff) |
libconfig: fix static windows build
Diffstat (limited to 'pkgs/development/libraries/libconfig')
-rw-r--r-- | pkgs/development/libraries/libconfig/default.nix | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/development/libraries/libconfig/default.nix b/pkgs/development/libraries/libconfig/default.nix index d94a0e1d78bd5..5c06808f67c3e 100644 --- a/pkgs/development/libraries/libconfig/default.nix +++ b/pkgs/development/libraries/libconfig/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, fetchurl }: +{ 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 { pname = "libconfig"; @@ -9,15 +15,18 @@ stdenv.mkDerivation rec { sha256 = "sha256-VFFm1srAN3RDgdHpzFpUBQlOe/rRakEWmbz/QLuzHuc="; }; - doCheck = true; + inherit doCheck; - configureFlags = lib.optional (stdenv.targetPlatform.isWindows || stdenv.hostPlatform.isStatic) "--disable-examples"; + 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 ]; - platforms = with platforms; linux ++ darwin ++ windows; + platforms = platforms.all; }; } |