-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
Download and run the nix install script:
curl -L https://raw.githubusercontent.com/steppercontrol/planer_build/master/sh/nix_install_2.18.2 | sh
The expected output ends with:
Installation finished! To ensure that the necessary environment
variables are set, either log in again, or type
. /home/boss/.nix-profile/etc/profile.d/nix.sh
in your shell.
Source the environment as instructed above, or:
. $HOME/.nix-profile/etc/profile.d/nix.sh
mkdir -p ~/.config/nix
echo "max-jobs = 4" >> ~/.config/nix/nix.conf
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
cd $planer_repository_path
git fetch
git checkout build
nix develop
planer init --shell --arduino-ide --arduino-core
planer configure
cd $planer_repository_path
git fetch
git checkout build
nix develop
planer build
planer upload
planer monitor
nix serves to provide reproducible development shells with the software
prerequisites for building the planer system. The flake.nix file in the
planer repository describes the system's dependencies and build environment.
With nix installed, the command nix develop enters a development shell with
these dependencies available.
The planer_build system provides a planer command with subcommands used to
take planer-related actions. For example:
-
planer initis used to initialize the development environment, including installing the Arduino CLI and configuring the Arduino IDE. -
planer configureis used to initialize a build directory. -
planer buildis used to build the system into a configured directory.
Before building the system, a build directory must be initialized. The build directory is where all artifacts are placed, including Arduino programs, test programs, and debug information. After initialization, a build directory need not be reinitialized until a breaking change in the planer system or hardware or software reconfiguration.
- The command
planer configureinitializes the build directory_buildinside - the current shell directory.
- On initialization, the file
config.toml.defaultis used as the configuration template. It is copied to_build/config.tomlwith more specific information added. - Subsequent invocations of
planer builduse_build/config.toml. Any changes to this file are propagated the next timeplaner buildis run.