docs: build using Nix

This commit is contained in:
FliegendeWurst 2021-07-24 21:46:52 +02:00
parent 825d89e6a0
commit 98acedca0e
2 changed files with 24 additions and 0 deletions

17
README.md Normal file
View File

@ -0,0 +1,17 @@
# raspi demo for oled ssd1306 display
## Quick start
> nix-shell
>
> rustup target add arm-unknown-linux-musleabihf
>
> cargo build --release --target arm-unknown-linux-musleabihf
Then scp the release file to your raspi.
## Example
![picture](./images/01.jpg)
![primitive](./images/02.jpg)

7
shell.nix Normal file
View File

@ -0,0 +1,7 @@
with (import <nixpkgs> {});
mkShell {
nativeBuildInputs = [
pkgsCross.muslpi.stdenv.cc
];
CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER = "${pkgsCross.muslpi.stdenv.cc}/bin/armv6l-unknown-linux-musleabihf-ld";
}