Loading pkgs/development/compilers/jsonnet/default.nix +11 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ jekyll cmake ]; buildInputs = [ gtest ]; cmakeFlags = ["-DBUILD_STATIC_LIBS=ON" "-DUSE_SYSTEM_GTEST=ON" ]; cmakeFlags = [ "-DUSE_SYSTEM_GTEST=ON" "-DBUILD_STATIC_LIBS=${if stdenv.hostPlatform.isStatic then "ON" else "OFF"}" "-DBUILD_SHARED_BINARIES=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" ]; # https://github.com/google/jsonnet/issues/778 patches = [ ./fix-cpp-unresolved-symbols.patch ]; enableParallelBuilding = true; Loading pkgs/development/compilers/jsonnet/fix-cpp-unresolved-symbols.patch 0 → 100644 +12 −0 Original line number Diff line number Diff line diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3a52458..872e6c6 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -10,6 +10,7 @@ set(LIBJSONNETPP_SOURCE add_library(libjsonnet++ SHARED ${LIBJSONNETPP_HEADERS} ${LIBJSONNETPP_SOURCE}) add_dependencies(libjsonnet++ jsonnet) +target_link_libraries(libjsonnet++ libjsonnet) # target_link_libraries(libjsonnet libjsonnet) # CMake prepends CMAKE_SHARED_LIBRARY_PREFIX to shared libraries, so without Loading
pkgs/development/compilers/jsonnet/default.nix +11 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ jekyll cmake ]; buildInputs = [ gtest ]; cmakeFlags = ["-DBUILD_STATIC_LIBS=ON" "-DUSE_SYSTEM_GTEST=ON" ]; cmakeFlags = [ "-DUSE_SYSTEM_GTEST=ON" "-DBUILD_STATIC_LIBS=${if stdenv.hostPlatform.isStatic then "ON" else "OFF"}" "-DBUILD_SHARED_BINARIES=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" ]; # https://github.com/google/jsonnet/issues/778 patches = [ ./fix-cpp-unresolved-symbols.patch ]; enableParallelBuilding = true; Loading
pkgs/development/compilers/jsonnet/fix-cpp-unresolved-symbols.patch 0 → 100644 +12 −0 Original line number Diff line number Diff line diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3a52458..872e6c6 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -10,6 +10,7 @@ set(LIBJSONNETPP_SOURCE add_library(libjsonnet++ SHARED ${LIBJSONNETPP_HEADERS} ${LIBJSONNETPP_SOURCE}) add_dependencies(libjsonnet++ jsonnet) +target_link_libraries(libjsonnet++ libjsonnet) # target_link_libraries(libjsonnet libjsonnet) # CMake prepends CMAKE_SHARED_LIBRARY_PREFIX to shared libraries, so without