dart.rhttp: add 0.9.6
This commit is contained in:
@@ -70,21 +70,21 @@
|
||||
# If we have actual cmake target provided create target and make existing
|
||||
# target depend on it
|
||||
- add_custom_target("${target}_cargokit" DEPENDS ${OUTPUT_LIB})
|
||||
+ add_custom_target("${target}_cargokit" DEPENDS OUTPUT_LIB)
|
||||
+ add_custom_target("${target}_cargokit" DEPENDS @output_lib@)
|
||||
add_dependencies("${target}" "${target}_cargokit")
|
||||
- target_link_libraries("${target}" PRIVATE "${OUTPUT_LIB}${IMPORT_LIB_EXTENSION}")
|
||||
+ target_link_libraries("${target}" PRIVATE OUTPUT_LIB)
|
||||
+ target_link_libraries("${target}" PRIVATE @output_lib@)
|
||||
if(WIN32)
|
||||
target_link_options(${target} PRIVATE "/INCLUDE:${any_symbol_name}")
|
||||
endif()
|
||||
else()
|
||||
# Otherwise (FFI) just use ALL to force building always
|
||||
- add_custom_target("${target}_cargokit" ALL DEPENDS ${OUTPUT_LIB})
|
||||
+ add_custom_target("${target}_cargokit" ALL DEPENDS OUTPUT_LIB)
|
||||
+ add_custom_target("${target}_cargokit" ALL DEPENDS @output_lib@)
|
||||
endif()
|
||||
|
||||
# Allow adding the output library to plugin bundled libraries
|
||||
- set("${target}_cargokit_lib" ${OUTPUT_LIB} PARENT_SCOPE)
|
||||
+ set("${target}_cargokit_lib" OUTPUT_LIB PARENT_SCOPE)
|
||||
+ set("${target}_cargokit_lib" @output_lib@ PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
rustPlatform,
|
||||
stdenv,
|
||||
replaceVars,
|
||||
}:
|
||||
|
||||
{ version, src, ... }:
|
||||
@@ -16,6 +17,7 @@ let
|
||||
cargoHash =
|
||||
{
|
||||
_0_9_1 = "sha256-Gl3ArdSuw3/yi/JX6oloKJqerSJjTfK8HXRNei/LO+4=";
|
||||
_0_9_6 = "sha256-a11UxG8nbIng+6uOWq/BZxdtRmRINl/7UOc6ap2mgrk=";
|
||||
}
|
||||
.${"_" + (lib.replaceStrings [ "." ] [ "_" ] version)} or (throw ''
|
||||
Unsupported version of pub 'rhttp': '${version}'
|
||||
@@ -34,17 +36,16 @@ stdenv.mkDerivation {
|
||||
inherit version src;
|
||||
inherit (src) passthru;
|
||||
|
||||
patches = [ ./cargokit.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./cargokit/cmake/cargokit.cmake --replace-fail "OUTPUT_LIB" "${rustDep}/${rustDep.passthru.libraryPath}"
|
||||
'';
|
||||
patches = [
|
||||
(replaceVars ./cargokit.patch {
|
||||
output_lib = "${rustDep}/${rustDep.passthru.libraryPath}";
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir $out/
|
||||
cp -r ./* $out/
|
||||
cp -r . $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user