Skip to content

Commit 88dea7e

Browse files
committed
Replace devenv with nix flake
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 56341e0 commit 88dea7e

File tree

6 files changed

+431
-192
lines changed

6 files changed

+431
-192
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ System dependencies
167167
```
168168
# NixOS
169169
nix-shell --run fish -p cargo systemd udev hidapi pkg-config
170-
direnv shell
170+
# NixOS using flakes
171+
nix develop
172+
# Or build fully using flake, see section below
171173
172174
# Fedora
173175
sudo dnf install systemd-devel hidapi-devel
@@ -179,6 +181,40 @@ sudo pkg install rust hidapi pkgconf
179181
sudo apt install rustup build-essential libhidapi-dev libsystemd-dev libudev-dev libusb-1.0-0-dev pkg-config
180182
```
181183

184+
### Nix Flake
185+
186+
If you have Nix with flakes enabled, you can build and develop without manually installing dependencies.
187+
188+
Run directly from GitHub
189+
```sh
190+
# Run directly from GitHub
191+
nix run github.com:FrameworkComputer/framework-system -- --versions
192+
193+
194+
Build and run locally after cloning:
195+
196+
```
197+
# Build the CLI tool (release)
198+
nix build .#tool
199+
200+
# Build the CLI tool (debug)
201+
nix build .#tool-debug
202+
203+
# Build the UEFI application (release)
204+
nix build .#uefi
205+
206+
# Run the CLI tool directly
207+
nix run .#tool -- --help
208+
209+
# Run the UEFI app in QEMU
210+
nix run .#qemu
211+
212+
# Enter a development shell with all dependencies
213+
nix develop
214+
```
215+
216+
### Building with Cargo
217+
182218
```sh
183219
# Running linter
184220
cargo clippy

devenv.lock

Lines changed: 0 additions & 160 deletions
This file was deleted.

devenv.nix

Lines changed: 0 additions & 18 deletions
This file was deleted.

devenv.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

flake.lock

Lines changed: 82 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)