Skip to content

Commit

Permalink
chore: add a shell.nix file to handle render libs (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
imrn99 authored Nov 6, 2024
1 parent 4dc0c05 commit 0775def
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
buildInputs = with pkgs; [
# Rust
rustup
# Render tool libs
xorg.libX11
xorg.libXcursor
xorg.libXi
libxkbcommon
xorg.libxcb
libudev-zero
];

# Render tool libs
LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${
with pkgs;
pkgs.lib.makeLibraryPath [
xorg.libX11
xorg.libXcursor
xorg.libXi
libxkbcommon
xorg.libxcb
pkgs.vulkan-loader
pkgs.glfw
]
}";

# Shell hook to set up the environment
shellHook = ''
# Initialize rustup if not already done
if [ ! -d "$HOME/.rustup" ]; then
rustup default stable
rustup component add rust-analyzer
fi
'';
}

0 comments on commit 0775def

Please sign in to comment.