Skip to content

Commit

Permalink
allow aarch64 as an alias for arm64 when associating a platform with …
Browse files Browse the repository at this point in the history
…a derivation
  • Loading branch information
timbertson committed Jan 29, 2024
1 parent fa8cf07 commit 7aae74a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ OPTIONS for --save:
--multiplatform Treat the entrypoint VALUE as a nix expression returning an attrset of
`platform: derivation`. Use this when cross-compiling for multiple
platforms. Implies `--expr`.
--platforms PLATFORMS Re-evaluate VALUE for each of the passe-in platforms (comma-separated).
--platforms PLATFORMS Re-evaluate VALUE for each of the passed-in platforms (comma-separated).
Unlike `--multiplatform`, this is used when you have built the same
expression natively on multiple platforms.
"#);
Expand Down
5 changes: 5 additions & 0 deletions cli/src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ impl FromStr for Arch {
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"x86_64" => Ok(Self::x86_64),

// uname reports `arm64`, so that's what we use for bootstrapping and
// CLI. But we also support `aarch64` since that's what we get from
// `drv.system` of a nix build.
"arm64" => Ok(Self::arm64),
"aarch64" => Ok(Self::arm64),
other => Err(anyhow!("Unknown arch: {}", other))
}
}
Expand Down

0 comments on commit 7aae74a

Please sign in to comment.