Skip to content

Commit 7ef9761

Browse files
authored
Flake devShell (#1549)
1 parent b37959c commit 7ef9761

File tree

5 files changed

+69
-0
lines changed

5 files changed

+69
-0
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ indent_style = tab
1818
indent_style = space
1919
indent_size = 2
2020

21+
[*.nix]
22+
indent_style = space
23+
indent_size = 2
24+
2125
[*.rb]
2226
indent_style = space
2327
indent_size = 2

.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
@@ -3,6 +3,7 @@
33
/stage
44
/parts
55
/prime
6+
.direnv
67
.gitignore.swp
78
.DS_Store
89
result

flake.lock

Lines changed: 27 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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
description = "onefetch";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
};
7+
8+
outputs = {
9+
self,
10+
nixpkgs,
11+
...
12+
}: let
13+
forAllSystems = fn: nixpkgs.lib.genAttrs [
14+
"aarch64-darwin"
15+
"aarch64-linux"
16+
"i686-linux"
17+
"x86_64-linux"
18+
"x86_64-darwin"
19+
] (system: fn nixpkgs.legacyPackages.${system});
20+
in {
21+
devShells = forAllSystems (pkgs: {
22+
default = pkgs.mkShell {
23+
name = "onefetch";
24+
packages = with pkgs; [
25+
cargo
26+
rustc
27+
clippy
28+
rustfmt
29+
rust-analyzer
30+
cmake
31+
];
32+
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
33+
};
34+
});
35+
};
36+
}

0 commit comments

Comments
 (0)