Skip to content

Commit 08270e8

Browse files
committed
Add devenv.nix
Must have only Nix and devenv installed ``` devenv shell cargo build sudo ./target/debug/framework_tool ``` Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent c2beb78 commit 08270e8

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed

.envrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export DIRENV_WARN_TIMEOUT=20s
2+
3+
eval "$(devenv direnvrc)"
4+
5+
use devenv

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,15 @@ build/
44
*.efi
55
*.exe
66
*.pdb
7+
8+
# Devenv
9+
.devenv*
10+
devenv.local.nix
11+
# Nix
12+
result*
13+
14+
# direnv
15+
.direnv
16+
17+
# pre-commit
18+
.pre-commit-config.yaml

devenv.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{ pkgs, lib, config, inputs, ... }:
2+
3+
{
4+
packages = with pkgs; [
5+
systemd # libudev
6+
];
7+
8+
languages.rust.enable = true;
9+
# https://devenv.sh/reference/options/#languagesrustchannel
10+
languages.rust.channel = "stable";
11+
}

devenv.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
inputs:
2+
fenix:
3+
url: github:nix-community/fenix
4+
inputs:
5+
nixpkgs:
6+
follows: nixpkgs
7+
nixpkgs:
8+
url: github:cachix/devenv-nixpkgs/rolling

nix.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Building with Nix
2+
3+
## Building with devenv
4+
5+
6+
Must have Nix and devenv installed
7+
8+
```
9+
devenv shell
10+
cargo build
11+
sudo ./target/debug/framework_tool
12+
```

0 commit comments

Comments
 (0)