microsoft / microsoft/pxt-microbit
Add Nix devshell flake
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
I've created a nix flake for this project which provides all the tooling and environment variables needed to generate a self-contained development environment.
Use of the devshell only requires that you install nix. Having done that, executing nix develop inside the repo drops you into a shell with access to all the required tooling, pinned to specific versions defined in the lock file. Nix builds the environment from a fixed, hashed set of inputs, meaning that the resulting environment is the same on any machine.
The packages are installed into an isolated, content-addressed path rather than shared system locations, avoiding conflicts with other projects. The environment is cross-platform: the same configuration works on Linux, macOS and Windows (via WSL).
This change is purely additive: it doesn't affect or replace any of the existing configuration or workflows. It requires just two files: flake.nix to declare the environment and flake.lock to pin package versions. Contributors who do not wish to use it can simply ignore it.
I'd like to propose adding my devshell configuration to the project, is this something you'd consider?
For reference, here are the flake.nix and flake.lock files.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the proposed flake.nix and flake.lock files linked in the issue, then run nix develop in the repository to inspect whether the environment builds and provides the required tooling and variables. Done means adding the two files without changing existing workflows and confirming the devshell works as described.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100