feat: export rustc, cargo, rustfmt, sccache for s390x
Adds rustc bootstrap patch to fix symlink_file "File exists" panic during s390x cross-compilation (lib.rs:1823). Removes existing destination before creating symlink.
This commit is contained in:
@@ -94,6 +94,18 @@
|
||||
});
|
||||
};
|
||||
})
|
||||
# Rustc bootstrap: symlink_file panics with "File exists" during
|
||||
# s390x cross-compilation (lib.rs:1823 calls t!(self.symlink_file(link, dst))).
|
||||
# Patch symlink_file in lib.rs to remove existing destination first.
|
||||
(final: prev: {
|
||||
rustc = prev.rustc.overrideAttrs (old: {
|
||||
postPatch =
|
||||
(old.postPatch or "")
|
||||
+ ''
|
||||
sed -i 's|if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref())|if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); symlink_file(src.as_ref(), link.as_ref())|' src/bootstrap/src/lib.rs
|
||||
'';
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
# Native builds
|
||||
@@ -149,7 +161,13 @@
|
||||
crossOnlyPackages =
|
||||
{
|
||||
"s390x-linux" = {
|
||||
inherit (pkgs) attic-client;
|
||||
inherit (pkgs)
|
||||
attic-client
|
||||
rustc
|
||||
cargo
|
||||
rustfmt
|
||||
sccache
|
||||
;
|
||||
nix = pkgs.nixVersions.nix_2_28;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user