-
Notifications
You must be signed in to change notification settings - Fork 3
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
git submodule integration #2
Comments
That is great to hear! :) I also get ELF-patching warnings, it seems OK. I haven't tried to package it as a submodule before, but if you are just looking for a 'portable' { pkgs ? import <nixpkgs> {}}:
let
esp-rs-src = builtins.fetchTarball "https://github.com/leighleighleigh/esp-rs-nix/archive/master.tar.gz";
esp-rs = pkgs.callPackage "${esp-rs-src}/esp-rs/default.nix" {};
in
pkgs.mkShell rec {
name = "esp-rs-nix";
buildInputs = [
esp-rs
pkgs.rustup # I can't remember why I needed this
#pkgs.espflash # broken, install with cargo instead!
pkgs.rust-analyzer
pkgs.pkg-config
pkgs.stdenv.cc
pkgs.systemdMinimal
];
shellHook = ''
# optionally reload your bashrc to make the ugly nix-shell prompt go away
#. ~/.bashrc
# this is important - it tells rustup where to find the esp toolchain,
# without needing to copy it into your local ~/.rustup/ folder.
export RUSTUP_TOOLCHAIN=${esp-rs}
'';
} |
thanks I like your shell.nix example ! may i ask where are you using it ? |
I haven't got a public repo that uses it at the moment - but I've got several commercial projects using embassy-rs, which use a shell.nix file like that :) |
Excellent job, it works on my machine too !!!
I had a couple of elf patching error but at the end I can compile....
I wonder how could we use your git repo as a esp-hal cargo project using git submodule maybe ?
If you flatten all files in the root of your repo, it could be used as a submodule just by creating a symlink to shell.nix from the root of the host repo (I guess).
The text was updated successfully, but these errors were encountered: