forked from lf-lang/lf-3pi-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
49 lines (47 loc) · 1.17 KB
/
shell.nix
File metadata and controls
49 lines (47 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ pkgs ? import <nixpkgs> {} } :
let
# lf = pkgs.callPackage ./nix/lf.nix {};
# lingo = pkgs.callPackage ./nix/lingo.nix {};
in
pkgs.mkShell {
packages = with pkgs; [
lolcat
picotool
cmake
gcc-arm-embedded
openocd
git
nodejs
zellij
screen
gdb
#fzf
];
buildInputs = [
# lf
# lingo
];
PICO_BOARD = "pololu_3pi_2040_robot";
PICO_PLATFORM = ""; # intentionally empty valued, allowing board header to set it
# TODO: integrate dependencies into nix
shellHook = ''
echo "[shell] hook start"
echo "[shell] setup pico-sdk"
git submodule update --init
cd pico-sdk/
git submodule update --init
export PICO_SDK_PATH="$PWD"
echo "[shell] PICO_SDK_PATH: $PICO_SDK_PATH" | lolcat
cd ../
export PICO_BOARD_HEADER_DIRS="$PWD/robot-lib"
echo "[shell] PICO_BOARD: $PICO_BOARD" | lolcat
echo "[shell] PICO_PLATFORM: $PICO_PLATFORM" | lolcat
echo "[shell] PICO_BOARD_HEADER_DIRS: $PICO_BOARD_HEADER_DIRS" | lolcat
echo "[shell] setup testbed"
cd test/
npm install
cd ../
echo '[shell] To exit the shell, type `exit` or press `Ctrl`+`D`'
echo "[shell] hook end"
'';
}