Open Spaqin opened 2 years ago
Haave you tried using rust-src from x86_64-linux?
This works (or at least I can successfully build https://github.com/rp-rs/rp2040-project-template): flake.nix:
{
description = "A simple flake";
inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
# nixpkgs are tracking github:NixOS/nixpkgs/nixos-22.05
};
outputs = { self, nixpkgs, fenix, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ fenix.overlay ]; };
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
(pkgs.fenix.fromToolchainFile { dir = ./.; })
];
};
}
);
}
rust-toolchain.toml:
[toolchain]
channel = "stable"
targets = ["thumbv6m-none-eabi"]
profile = "complete"
I tried to introduce flakes to our embedded systems projects, and Fenix seemed like a nice lightweight solution, especially for someone new in the nix ecosystem like me.
Seems like this would be the correct flake code:
Which does get me to the compiling stage, but unfortunately it errors out later with
However, the only package for that platform for crosscompiling is
rust-std
- which doesn't cover our needs (we'd needrust-src
).How difficult would it be to add support for this, and possibly other embedded development platforms?