2021-01-19 08:52:19 +01:00
|
|
|
{ stdenv, pkgs ? import <nixpkgs> {} }:
|
2021-01-19 07:54:51 +01:00
|
|
|
|
|
|
|
pkgs.mkShell {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
2021-01-19 08:16:15 +01:00
|
|
|
(rust-bin.nightly.latest.rust.override { extensions = ["rust-src"]; })
|
2021-01-19 07:54:51 +01:00
|
|
|
lld_10
|
2021-01-19 08:52:19 +01:00
|
|
|
stdenv.cc.cc.lib
|
|
|
|
# pkg-config
|
2021-01-19 07:54:51 +01:00
|
|
|
];
|
2021-01-19 08:19:27 +01:00
|
|
|
RUSTFLAGS = "-C link-arg=-fuse-ld=lld -C target-cpu=native";
|
2021-01-19 07:54:51 +01:00
|
|
|
RUST_BACKTRACE = "1";
|
2021-01-19 08:52:19 +01:00
|
|
|
# https://github.com/rust-lang/rust/issues/55979
|
|
|
|
LD_LIBRARY_PATH="${stdenv.cc.cc.lib}/lib64:$LD_LIBRARY_PATH";
|
2021-01-19 07:54:51 +01:00
|
|
|
}
|
|
|
|
|