Skip to content

Commit 4bccf7d

Browse files
committed
Setup nix flake
1 parent 68980e9 commit 4bccf7d

File tree

5 files changed

+342
-4
lines changed

5 files changed

+342
-4
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
target
2-
Cargo.lock
3-
4-
*.bk
5-
*\~
2+
.direnv/

Cargo.lock

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

flake.lock

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

flake.nix

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "nixpkgs/nixos-unstable";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
rust-overlay.url = "github:oxalica/rust-overlay";
6+
};
7+
8+
outputs =
9+
{
10+
nixpkgs,
11+
flake-utils,
12+
rust-overlay,
13+
...
14+
}:
15+
flake-utils.lib.eachDefaultSystem (
16+
system:
17+
let
18+
overlays = [
19+
(import rust-overlay)
20+
];
21+
pkgs = import nixpkgs {
22+
inherit system overlays;
23+
};
24+
25+
rust = pkgs.rust-bin.stable.latest.default.override {
26+
extensions = [
27+
"rust-analyzer"
28+
"rust-src"
29+
];
30+
};
31+
in
32+
{
33+
devShells.default = pkgs.mkShell {
34+
packages = [
35+
pkgs.just
36+
rust
37+
];
38+
};
39+
40+
}
41+
);
42+
}

0 commit comments

Comments
 (0)