Skip to content

Instantly share code, notes, and snippets.

@yaymukund
Created March 26, 2021 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaymukund/d9aeb8d2529d2ae3af9b8ae7806a15ab to your computer and use it in GitHub Desktop.
Save yaymukund/d9aeb8d2529d2ae3af9b8ae7806a15ab to your computer and use it in GitHub Desktop.
How to set LD_LIBRARY_PATH for a Rust project.
{ pkgs ? import <nixpkgs> { }, lib ? pkgs.stdenv.lib }:
pkgs.mkShell rec {
name = "rust-env";
buildInputs = with pkgs; [
rustc
cargo
clang
openssl
pkgconfig
libGL
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment