Adapt cs_loader_impl for Guix build.
@@ -29,6 +29,23 @@ message(STATUS "Plugin ${target} implementation")
# Create target
#
+if(OPTION_BUILD_GUIX)
+ if(DOTNET_VERSION VERSION_EQUAL "2.0" OR DOTNET_VERSION VERSION_GREATER "2.0")
+ execute_process(
+ COMMAND ${DOTNET_COMMAND} nuget locals all --list | grep global-packages | awk '{print $NF}'
+ OUTPUT_VARIABLE DOTNET_SOURCE
+ )
+ else()
+ set(DOTNET_SOURCE)
+ message(FATAL_ERROR ".NET Core support not implemented in Guix build for versions less than 2.0.")
+ endif()
+
+ # Build without internet access
+ add_custom_target(${target} ALL
+ COMMAND ${DOTNET_COMMAND} restore --source ${DOTNET_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj
+ COMMAND ${DOTNET_COMMAND} publish --source ${DOTNET_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj -o ${CMAKE_BINARY_DIR}
+ )
+else()
if(DOTNET_VERSION VERSION_EQUAL "2.0" OR DOTNET_VERSION VERSION_GREATER "2.0")
add_custom_target(${target} ALL
COMMAND ${DOTNET_COMMAND} restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj
@@ -48,6 +65,7 @@ else()
)
endif()
endif()
+endif()
#
# Project options
