Skip to content

Commit 8059bca

Browse files
committed
Flake devShell
1 parent b37959c commit 8059bca

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.envrc

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

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+
nixpkgs,
10+
self,
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}/lib/rustlib/src/rust/library/";
33+
};
34+
});
35+
};
36+
}

0 commit comments

Comments
 (0)