Skip to content

Commit 05a56dc

Browse files
committed
nix: init toolchain
1 parent aba2957 commit 05a56dc

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

flake.lock

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
3+
4+
outputs = {nixpkgs, ...}: let
5+
systems = ["x86_64-linux" "aarch64-linux"];
6+
forEachSystem = nixpkgs.lib.genAttrs systems;
7+
8+
pkgsForEach = nixpkgs.legacyPackages;
9+
in {
10+
devShells = forEachSystem (system: {
11+
default = pkgsForEach.${system}.callPackage ./shell.nix {};
12+
});
13+
};
14+
}

shell.nix

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
mkShell,
3+
dbus,
4+
python3,
5+
pkg-config,
6+
rust-analyzer-unwrapped,
7+
rustfmt,
8+
clippy,
9+
cargo,
10+
rustc,
11+
rustPlatform,
12+
xorg,
13+
}:
14+
mkShell {
15+
env."RUST_SRC_PATH" = "${rustPlatform.rustLibSrc}";
16+
17+
strictDeps = true;
18+
buildInputs = [dbus xorg.libxcb];
19+
nativeBuildInputs = [
20+
pkg-config
21+
python3
22+
23+
cargo
24+
rustc
25+
rust-analyzer-unwrapped
26+
rustfmt
27+
clippy
28+
];
29+
}

0 commit comments

Comments
 (0)