mirror of
https://github.com/oxalica/rust-overlay.git
synced 2025-10-05 15:52:54 +02:00
31 lines
635 B
Nix
31 lines
635 B
Nix
# Example flake for `nix shell`.
|
|
# See docs/cross_compilation.md for details.
|
|
(import <nixpkgs> {
|
|
crossSystem = "aarch64-linux";
|
|
overlays = [ (import ../..) ];
|
|
}).callPackage
|
|
(
|
|
{
|
|
mkShell,
|
|
stdenv,
|
|
rust-bin,
|
|
pkg-config,
|
|
openssl,
|
|
qemu,
|
|
}:
|
|
mkShell {
|
|
nativeBuildInputs = [
|
|
rust-bin.stable.latest.minimal
|
|
pkg-config
|
|
];
|
|
|
|
depsBuildBuild = [ qemu ];
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER = "${stdenv.cc.targetPrefix}cc";
|
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER = "qemu-aarch64";
|
|
}
|
|
)
|
|
{ }
|