pkgsStatic.cmark: fix build

Pass configuration flag to prevent build system from attempting to build .so
shared library during pkgsStatic build. Upstream build system is not capable of
figuring on its own that it is impossible.
This commit is contained in:
Dmitry Bogatov 2022-11-06 19:35:05 -05:00 committed by Bjørn Forsman
parent 8c60992ea9
commit 9998ec71cc

View File

@ -13,10 +13,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
cmakeFlags = [
# Link the executable with the shared library
"-DCMARK_STATIC=OFF"
];
cmakeFlags =
# Link the executable with the shared library on system with shared libraries.
lib.optional (!stdenv.hostPlatform.isStatic) "-DCMARK_STATIC=OFF"
# Do not attempt to build .so library on static platform.
++ lib.optional stdenv.hostPlatform.isStatic "-DCMARK_SHARED=OFF";
doCheck = true;