sandbox:C Programming and Turnkey Ecosystem
Clone the repo
git clone git@github.com:permalik/c_sandbox.git
Enter Nix shell
nix develop
Nix Format
alejandra <target>
C Format
# Clang Format
c-format-all
C Lint
# Clang Lint
c-lint-all
# Clang Lint and Fix
c-lint-all-fix
C formatter, linter, and various Pre-Commit hooks.
Initialize
# Make script executable
sudo chmod +x precommit.sh
# Execute script
sudo ./precommit.sh
The root .bashrc
will be sourced within the shell.
If changes are needed, update .bashrc
and restart the shell with nix develop
GitHub Actions on Push and Pull Request using Ubuntu x86_64-Linux Self-Hosted Runner
# Restart Docker
orb restart docker
# Create image
docker build -t c_sandbox:dev .
# Build ephemeral container
docker run --rm c_sandbox:dev
# Destroy image
docker rmi c_sandbox:dev
Follow instructions to purge curricula and launch a somewhat opinionated turnkey ecosystem.
Initialize purge
# Make script executable
sudo chmod +x nuke.sh
# Execute script
sudo ./nuke.sh
Update project/repository naming in various places and update the README:
./.bashrc
Dockerfile
README.md
flake.nix
Rebuild the environment
./build.sh
Repopulate and Rerun the Build
./run.sh