-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
26 lines (23 loc) · 708 Bytes
/
default.nix
File metadata and controls
26 lines (23 loc) · 708 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
{ pkgs ? import <nixpkgs> {} }:
let
overrides = (builtins.fromTOML (builtins.readFile ./rust-toolchain.toml));
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
rustVersion = overrides.toolchain.channel;
rust = pkgs.rust-bin.stable.${rustVersion}.default.override {
extensions = [
"rust-src"
"rust-analyzer"
];
};
buildInputs = (import ./nix/inputs.nix pkgs).buildInputs;
in
pkgs.mkShell {
inherit buildInputs;
nativeBuildInputs = [
pkgs.pkg-config
rust
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
RUST_BACKTRACE = 1;
}