tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
dart.rhttp: add 0.9.6
aucub
1 year ago
020aaf62
f0a890df
+12
-11
2 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
dart
package-source-builders
rhttp
cargokit.patch
default.nix
+4
-4
pkgs/development/compilers/dart/package-source-builders/rhttp/cargokit.patch
···
70
70
# If we have actual cmake target provided create target and make existing
71
71
# target depend on it
72
72
- add_custom_target("${target}_cargokit" DEPENDS ${OUTPUT_LIB})
73
73
-
+ add_custom_target("${target}_cargokit" DEPENDS OUTPUT_LIB)
73
73
+
+ add_custom_target("${target}_cargokit" DEPENDS @output_lib@)
74
74
add_dependencies("${target}" "${target}_cargokit")
75
75
- target_link_libraries("${target}" PRIVATE "${OUTPUT_LIB}${IMPORT_LIB_EXTENSION}")
76
76
-
+ target_link_libraries("${target}" PRIVATE OUTPUT_LIB)
76
76
+
+ target_link_libraries("${target}" PRIVATE @output_lib@)
77
77
if(WIN32)
78
78
target_link_options(${target} PRIVATE "/INCLUDE:${any_symbol_name}")
79
79
endif()
80
80
else()
81
81
# Otherwise (FFI) just use ALL to force building always
82
82
- add_custom_target("${target}_cargokit" ALL DEPENDS ${OUTPUT_LIB})
83
83
-
+ add_custom_target("${target}_cargokit" ALL DEPENDS OUTPUT_LIB)
83
83
+
+ add_custom_target("${target}_cargokit" ALL DEPENDS @output_lib@)
84
84
endif()
85
85
86
86
# Allow adding the output library to plugin bundled libraries
87
87
- set("${target}_cargokit_lib" ${OUTPUT_LIB} PARENT_SCOPE)
88
88
-
+ set("${target}_cargokit_lib" OUTPUT_LIB PARENT_SCOPE)
88
88
+
+ set("${target}_cargokit_lib" @output_lib@ PARENT_SCOPE)
89
89
90
90
endfunction()
+8
-7
pkgs/development/compilers/dart/package-source-builders/rhttp/default.nix
···
2
2
lib,
3
3
rustPlatform,
4
4
stdenv,
5
5
+
replaceVars,
5
6
}:
6
7
7
8
{ version, src, ... }:
···
16
17
cargoHash =
17
18
{
18
19
_0_9_1 = "sha256-Gl3ArdSuw3/yi/JX6oloKJqerSJjTfK8HXRNei/LO+4=";
20
20
+
_0_9_6 = "sha256-a11UxG8nbIng+6uOWq/BZxdtRmRINl/7UOc6ap2mgrk=";
19
21
}
20
22
.${"_" + (lib.replaceStrings [ "." ] [ "_" ] version)} or (throw ''
21
23
Unsupported version of pub 'rhttp': '${version}'
···
34
36
inherit version src;
35
37
inherit (src) passthru;
36
38
37
37
-
patches = [ ./cargokit.patch ];
38
38
-
39
39
-
postPatch = ''
40
40
-
substituteInPlace ./cargokit/cmake/cargokit.cmake --replace-fail "OUTPUT_LIB" "${rustDep}/${rustDep.passthru.libraryPath}"
41
41
-
'';
39
39
+
patches = [
40
40
+
(replaceVars ./cargokit.patch {
41
41
+
output_lib = "${rustDep}/${rustDep.passthru.libraryPath}";
42
42
+
})
43
43
+
];
42
44
43
45
installPhase = ''
44
46
runHook preInstall
45
47
46
46
-
mkdir $out/
47
47
-
cp -r ./* $out/
48
48
+
cp -r . $out
48
49
49
50
runHook postInstall
50
51
'';