Skip to content

Commit c71f3a8

Browse files
committed
Flake devShell
1 parent b37959c commit c71f3a8

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/target
2+
/.direnv
23
**/*.rs.bk
34
/stage
45
/parts

flake.lock

Lines changed: 62 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: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
description = "onefetch";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
rust-overlay.url = "github:oxalica/rust-overlay";
7+
};
8+
9+
outputs = {
10+
nixpkgs,
11+
rust-overlay,
12+
...
13+
}: let
14+
system = "x86_64-linux";
15+
pkgs = import nixpkgs {
16+
inherit system;
17+
overlays = [
18+
(import rust-overlay)
19+
];
20+
};
21+
in {
22+
devShells.${system}.default = pkgs.mkShell {
23+
name = "onefetch";
24+
packages = with pkgs; [
25+
(rust-bin.stable.latest.default.override {
26+
extensions = [
27+
"rust-src"
28+
"cargo"
29+
"rustc"
30+
];
31+
})
32+
clippy
33+
rust-analyzer
34+
rustlings
35+
cmake
36+
];
37+
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}/lib/rustlib/src/rust/library/";
38+
};
39+
};
40+
}

0 commit comments

Comments
 (0)