aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-01-19 07:52:19 +0000
committerBlaž Hrastnik2021-01-19 07:52:19 +0000
commit240f3a6cc4af8b51a866770fbbb6771032d10f78 (patch)
tree5488aee4cbe780010ac447ba4775b1f5560b4f13 /shell.nix
parent22fe2ebe72314681b5c87ed97b6a9d5a03c3dec2 (diff)
nix: Fix execution errors regarding runtime C lib.
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/shell.nix b/shell.nix
index 9c63ab9f..be1b20d0 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,12 +1,15 @@
-{ pkgs ? import <nixpkgs> {} }:
+{ stdenv, pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
(rust-bin.nightly.latest.rust.override { extensions = ["rust-src"]; })
lld_10
- # pkgconfig
+ stdenv.cc.cc.lib
+ # pkg-config
];
RUSTFLAGS = "-C link-arg=-fuse-ld=lld -C target-cpu=native";
RUST_BACKTRACE = "1";
+ # https://github.com/rust-lang/rust/issues/55979
+ LD_LIBRARY_PATH="${stdenv.cc.cc.lib}/lib64:$LD_LIBRARY_PATH";
}