From 9998ec71ccea8f6f794c9484412b90010fd9959d Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sun, 6 Nov 2022 19:35:05 -0500 Subject: [PATCH] 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. --- pkgs/development/libraries/cmark/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/cmark/default.nix b/pkgs/development/libraries/cmark/default.nix index ad4804febbc1..f2945116e7ef 100644 --- a/pkgs/development/libraries/cmark/default.nix +++ b/pkgs/development/libraries/cmark/default.nix @@ -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;