mirror of
https://github.com/oxalica/rust-overlay.git
synced 2024-10-04 05:07:13 +03:00
Fix dependency offset for propagated gcc
This commit is contained in:
parent
b0d0959bbb
commit
c7ed82b231
@ -1,18 +1,22 @@
|
||||
with import <nixpkgs> {
|
||||
(import <nixpkgs> {
|
||||
crossSystem = "aarch64-linux";
|
||||
overlays = [ (import ../..) ];
|
||||
};
|
||||
}).callPackage (
|
||||
{ mkShell, rust-bin, pkg-config, openssl, pkgsBuildBuild }:
|
||||
mkShell {
|
||||
nativeBuildInputs = [
|
||||
# Manual `buildPackages` is required here. See: https://github.com/NixOS/nixpkgs/issues/49526
|
||||
# build = host = x86_64, target = aarch64
|
||||
buildPackages.rust-bin.stable.latest.minimal
|
||||
buildPackages.pkg-config
|
||||
# build = host = target = x86_64, just to avoid re-build.
|
||||
rust-bin.stable.latest.minimal
|
||||
pkg-config
|
||||
|
||||
# build = host = target = x86_64
|
||||
# qemu itself is multi-platform and `target` doesn't matter for it.
|
||||
# Use build system's to avoid rebuild.
|
||||
pkgsBuildBuild.qemu
|
||||
];
|
||||
buildInputs = [
|
||||
# build = x86_64, host = target = aarch64
|
||||
openssl
|
||||
];
|
||||
}
|
||||
}) {}
|
||||
|
@ -326,10 +326,9 @@ let
|
||||
|
||||
# FIXME: If these propagated dependencies go components, darwin build will fail with "`-liconv` not found".
|
||||
|
||||
# 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 ] ++
|
||||
# Ourselves have offset -1. In order to make these offset -1 dependencies of downstream derivation,
|
||||
# they are offset 0 propagated.
|
||||
propagatedBuildInputs = [ self.gcc self.buildPackages.gcc ] ++
|
||||
self.lib.optional (self.stdenv.targetPlatform.isDarwin) self.targetPackages.libiconv;
|
||||
|
||||
meta.platforms = self.lib.platforms.all;
|
||||
|
Loading…
Reference in New Issue
Block a user