forked from jj-style/stegosaurust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
29 lines (29 loc) · 789 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
based on
https://discourse.nixos.org/t/how-can-i-set-up-my-rust-programming-environment/4501/9
*/
let
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/06278c77b5d162e62df170fec307e83f1812d94b.tar.gz") { overlays = [ rust_overlay ]; };
#rustVersion = "latest";
rustVersion = "1.65.0";
rust = pkgs.rust-bin.stable.${rustVersion}.default.override {
extensions = [
"rust-src" # for rust-analyzer
];
};
in
pkgs.mkShell {
buildInputs = [
rust
] ++ (with pkgs; [
pkg-config
openssl
rust-analyzer
cargo
rustfmt
clippy
]);
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
RUST_BACKTRACE = 1;
}