pkgsStatic.jansson: fix build

Fixes: 938f2ce1017 ("jansson: enable shared library installation")

+5 -3
+5 -3
pkgs/development/libraries/jansson/default.nix
··· 13 14 nativeBuildInputs = [ cmake ]; 15 16 - # networkmanager relies on libjansson.so: 17 - # https://github.com/NixOS/nixpkgs/pull/176302#issuecomment-1150239453 18 - cmakeFlags = [ "-DJANSSON_BUILD_SHARED_LIBS=ON" ]; 19 20 meta = with lib; { 21 homepage = "https://github.com/akheron/jansson";
··· 13 14 nativeBuildInputs = [ cmake ]; 15 16 + cmakeFlags = [ 17 + # networkmanager relies on libjansson.so: 18 + # https://github.com/NixOS/nixpkgs/pull/176302#issuecomment-1150239453 19 + "-DJANSSON_BUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 20 + ]; 21 22 meta = with lib; { 23 homepage = "https://github.com/akheron/jansson";