Skip to content

Commit

Permalink
added shell.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
SrTobi committed Oct 1, 2023
1 parent 8b6f560 commit 6f9ba73
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "stable"
20 changes: 20 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell rec {
nativeBuildInputs = [
pkg-config rustup
];
buildInputs = [
];
RUSTC_VERSION =
builtins.elemAt
(builtins.match
".*channel *= *\"([^\"]*)\".*"
(pkgs.lib.readFile ./rust-toolchain.toml)
)
0;
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
shellHook = ''
rustup toolchain install ''${RUSTC_VERSION}
'';
}

0 comments on commit 6f9ba73

Please sign in to comment.