Skip to content

Instantly share code, notes, and snippets.

@mankyKitty
Created February 26, 2022 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mankyKitty/2f6cbe94a3d4b450cc995ac5b2d910e9 to your computer and use it in GitHub Desktop.
Save mankyKitty/2f6cbe94a3d4b450cc995ac5b2d910e9 to your computer and use it in GitHub Desktop.
nix shell for building picosystem-rs things (https://github.com/rlane/picosystem-rs)
{ srcs ? import ./nix/sources.nix }:
let
pkgs = import srcs.nixpkgs {
crossSystem = (import "${srcs.nixpkgs}/lib").systems.examples.raspberryPi // {
rustc.config = "thumbv6m-none-eabi";
};
};
in
pkgs.mkShell {
buildInputs = with pkgs; [
cargo
cargo-watch
clippy
rustc
rustfmt
pkg-config
libudev
];
# For openssl-sys crate
PKG_CONFIG_PATH = "${pkgs.libudev.dev}/lib/pkgconfig";
# See https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570/3?u=samuela.
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
}
@mankyKitty
Copy link
Author

Unfortunately this builds rustc from source :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment