dart.rhttp: add 0.9.6

aucub 020aaf62 f0a890df

Changed files
+12 -11
pkgs
development
compilers
dart
package-source-builders
+4 -4
pkgs/development/compilers/dart/package-source-builders/rhttp/cargokit.patch
···
# 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()
+8 -7
pkgs/development/compilers/dart/package-source-builders/rhttp/default.nix
···
lib,
rustPlatform,
stdenv,
+
replaceVars,
}:
{ version, src, ... }:
···
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}'
···
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
'';