From 240f3a6cc4af8b51a866770fbbb6771032d10f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Tue, 19 Jan 2021 16:52:19 +0900 Subject: [PATCH] nix: Fix execution errors regarding runtime C lib. --- shell.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shell.nix b/shell.nix index 9c63ab9f6..be1b20d0b 100644 --- a/shell.nix +++ b/shell.nix @@ -1,12 +1,15 @@ -{ pkgs ? import {} }: +{ stdenv, pkgs ? import {} }: 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"; }