mirror of
https://github.com/oxalica/rust-overlay.git
synced 2024-10-04 05:07:13 +03:00
Fix cross-compilation
Dependencies were specified in `depsTargetTarget` which would make them end up in the dependencies for the target platform when they are actually dependencies needed on the buildPlatform using the rust package. I.e. they are target dependencies of the compiler package but will be used as build platform dependencies when propagated.
This commit is contained in:
parent
45b4f9e6ab
commit
70fc350a3f
@ -299,14 +299,17 @@ let
|
||||
# Need to do it manually.
|
||||
mkdir -p "$out/nix-support"
|
||||
echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs"
|
||||
if [[ -n "$depsTargetTargetPropagated" ]]; then
|
||||
echo "$depsTargetTargetPropagated" > "$out/nix-support/propagated-target-target-deps"
|
||||
if [[ -n "$propagatedNativeBuildInputs" ]]; then
|
||||
echo "$propagatedNativeBuildInputs" > "$out/nix-support/propagated-native-build-inputs"
|
||||
fi
|
||||
'';
|
||||
|
||||
# FIXME: If these propagated dependencies go components, darwin build will fail with "`-liconv` not found".
|
||||
propagatedBuildInputs = [ self.stdenv.cc ];
|
||||
depsTargetTargetPropagated =
|
||||
|
||||
# use propagatedNativebuildinputs here because we want these dependencies to end up
|
||||
# as buildPlatform dependencies on the derivation using the compiler even though
|
||||
# they are targetPlatform dependencies from the compiler's perspective
|
||||
propagatedNativeBuildInputs = [ self.stdenv.cc self.targetPackages.stdenv.cc ] ++
|
||||
self.lib.optional (self.stdenv.targetPlatform.isDarwin) self.targetPackages.libiconv;
|
||||
|
||||
meta.platforms = self.lib.platforms.all;
|
||||
|
Loading…
Reference in New Issue
Block a user