flipperzero-rs / flipperzero

Rust on the Flipper Zero
MIT License
518 stars 34 forks source link

build(nix): configure build environment via flake #151

Closed JarvisCraft closed 3 months ago

JarvisCraft commented 3 months ago

Description

This PR brings Nix support by adding a flake.nix file.

While not required, this simplifies development on Nix-based systems (NixOS and other ones using Nix package manager).

Meaning

Since Nix syntax may be new to many, I will explain the file (with its current contents).

What it does is:

The shell is available via nix develop purely (i.e. without anything else from the system) or impurely (i.e., the packages are added on top of the system). .envrc file allows the automatic creation of this environment for the user in this directory (being no-op if the user is not using Nix).

Purpose

While currently this is only to simplify my local development :pekaface:, I intend to use it for some more automations in the repository. For example, I would like to add another dev shell (other from default) which would contain act for easo of testing GitHub Actions locally.

JarvisCraft commented 3 months ago

Merging this as its child #152 has been approved by @dcoles.