Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host component rust-docs doesn't support target aarch64-apple-darwin #55

Closed
npajkovsky opened this issue Oct 21, 2021 · 3 comments
Closed

Comments

@npajkovsky
Copy link

Hey,

I wanted to use your overlay and it seems, that it's not fully ready for aarch64-apple-darwin.

-> % home-manager build
error: Component resolution failed for rust-default-1.55.0
       - note: available extensions are cargo, clippy, clippy-preview, llvm-tools-preview, miri, miri-preview, reproducible-artifacts, rls, rls-preview, rust-analysis, rust-analyzer-preview, rust-docs, rust-mingw, rust-src, rust-std, rustc, rustc-dev, rustc-docs, rustfmt, rustfmt-preview
       - Host component `rust-docs` doesn't support target `aarch64-apple-darwin`
(use '--show-trace' to show detailed location information)
-> % uname -a
Darwin Nikolas-MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64 arm64 MacBookPro17,1 Darwin

Snip from my home manager.

{ lib, config, pkgs, ... }:

let
  oxalica-overlays = import (builtins.fetchTarball {
    url = https://github.com/oxalica/rust-overlay/archive/master.tar.gz;
  });
in
{
  nixpkgs.overlays = [ oxalica-overlays ];

  home.packages = with pkgs; [
    (rust-bin.stable.latest.default.override {
      extensions = [ "rustc" ];
      targets = [ "wasm32-unknown-unknown" ];
    })

@oxalica
Copy link
Owner

oxalica commented Oct 23, 2021

Yes. Upstream doesn't provide rust-docs for aarch64-apple-darwin currently. All available components are:
https://rust-lang.github.io/rustup-components-history/aarch64-apple-darwin.html

Upstream said it's intentional since aarch64-apple-darwin is not a tier 1 platform:
rust-lang/rustup#2692

You can install docs for only x86_64-apple-darwin as a workaround.

rust-bin.stable.latest.default.override {
  targets = [ "x86_64-apple-darwin" ];
  # Use `targetExtensions` to only install these for `targets`, not for your host platform `aarch64-apple-darwin`.
  targetExtensions = [ "rust-docs" ];
}

@oxalica oxalica closed this as completed Oct 23, 2021
@npajkovsky
Copy link
Author

That actually does not work either.

@oxalica
Copy link
Owner

oxalica commented Oct 26, 2021

That actually does not work either.

I pushed f0a3769 to fix targetExtensions. The code above should work now. Please check again on current master.
If it still doesn't work, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants