Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ let
in
pkgs.mkShell {
packages = with pkgs; [
lolcat
picotool
cmake
gcc-arm-embedded
Expand All @@ -20,6 +21,10 @@ pkgs.mkShell {
# lingo
];

# set environment variables
#PICO_BOARD = "pico";
#PICO_PLATFORM = "rp2040";

# TODO: integrate dependencies into nix
shellHook = ''
echo "[shell] hook start"
Expand All @@ -28,13 +33,17 @@ pkgs.mkShell {
cd pico-sdk/
git submodule update --init
export PICO_SDK_PATH="$PWD"
echo "[shell] PICO_SDK_PATH: $PICO_SDK_PATH" | lolcat
cd ../
echo "[shell] copy robot header"
echo "[shell] copy robot header (pololu_3pi_2040_robot.h)" | lolcat
cp pololu_3pi_2040_robot.h pico-sdk/src/boards/include/boards/
echo "[shell] PICO_BOARD: $PICO_BOARD" | lolcat
echo "[shell] PICO_PLATFORM: $PICO_PLATFORM" | lolcat
echo "[shell] setup testbed"
cd test/
npm install
echo "[shell] hook end"
cd ../
echo '[shell] To exit the shell, type `exit` or press `Ctrl`+`D`'
echo "[shell] hook end"
'';
}