{ pkgs ? import <nixpkgs> { }, lib ? pkgs.stdenv.lib }:
pkgs.mkShell rec {
name = "rust-env";
buildInputs = with pkgs; [
rustc
cargo
clang
openssl
pkgconfig
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
}
Enter the shell with nix-shell --pure
. Always use a pure shell with development to ensure the expression actually works in other environments.
You can run the examples now, cargo run --example window
This shell doesn't work for me - I'm getting:
On Ubuntu + Nix under WSL.