-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshell.nix
More file actions
32 lines (28 loc) · 707 Bytes
/
shell.nix
File metadata and controls
32 lines (28 loc) · 707 Bytes
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
30
31
32
{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs.lib) makeLibraryPath;
inherit (pkgs.lib) fileContents;
inherit (pkgs) stdenv;
in
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages; [
pkg-config
zlib
openssl
cargo
clippy
rustc
rustfmt
gcc
];
NIX_LD_LIBRARY_PATH = makeLibraryPath [
stdenv.cc.cc
pkgs.openssl
pkgs.zlib
pkgs.pkg-config
pkgs.gcc
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
NIX_LD = fileContents "${stdenv.cc}/nix-support/dynamic-linker";
}
# For VSCode and Rust Analyzer use the Extension "Nix Environment Selector"