{ 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
@bobbbay under windows 11? As far as I know it is not possible to create gui/opengl things in windows 10 using WSL. Win 11 WSL supports a wayland backend, but idk if gpu acceleration is supported yet? Can you run other GPU accelerated programs from Nix under WSL?