- Nix 61.1%
- Python 38.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| editor.py | ||
| flake.nix | ||
| msim.nix | ||
| README.md | ||
| shell.nix | ||
MSIM and GCC support for NSWI200
Development environment for Operating Systems labs at MFF CUNI.
Why should I use this?
You need to install MSIM and GCC configured for cross compilation in order to locally
develop your OS. However, figuring out how to build and install those on non-supported
distributions (or god forbid MacOS) is a pain. Also getting your editor to work correctly
(such as clangd) can be confusing.
Usage
The only dependency you need is Nix (with flakes enabled). If you don't have it, you may install Lix. To enable flakes, you may want to read the ... manual or figure out how not to use them.
After you have obtained Nix, drop all files (apart from this README) into your
project (including .gitignore contents) and run the following commands:
git add *.nix # make nix files findable
nix flake lock # generates `flake.lock`, preventing GCC rebuilding
git add flake.lock # same as the first line
nix develop # drops you into a shell with the project ready to go
The build may take considerable time. However, you don't need to rebuild after the first run. After this setup, commit your changes and you are good to go. Bear in mind a few caveats:
nix developuses bash, usenix develop -c $your-shellto drop into your shell- The shell bundles python to configure msim and setup dev support
- You may need to delete
config.mkand rerun the configure script to detect changes - The tools are only (with caveats) visible in the session, so launch your tools
from the session where you ran
nix develop