Files
picoforge/shell.nix
T

70 lines
1.2 KiB
Nix
Raw Normal View History

{
pkgs ? import <nixpkgs> { },
}:
2026-01-15 16:11:28 +01:00
let
libraries = with pkgs; [
pcsclite
hidapi
mesa
udev
libxkbcommon
vulkan-loader
wayland
libglvnd
wayland-protocols
libunwind
libdrm
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
xorg.libxcb
2026-01-15 16:11:28 +01:00
];
packages = with pkgs; [
curl
wget
pkg-config
dbus
openssl_3
librsvg
git
2026-01-15 16:11:28 +01:00
# Development tools
rustc
clippy
rustfmt
rust-analyzer
rustPlatform.rustLibSrc
mold
2026-01-15 16:11:28 +01:00
cargo
# GPUI
libxkbcommon
2026-01-15 16:11:28 +01:00
# Hardware
pcsclite
hidapi
udev
];
in
pkgs.mkShell {
buildInputs = packages;
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
2026-01-15 16:11:28 +01:00
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=$GSETTINGS_SCHEMAS_PATH:$XDG_DATA_DIRS
export RUSTFLAGS="-C link-arg=-fuse-ld=mold"
# Try to uncomment the following lines if you encounter EGL_BAD_PARAMETER errors:
# export LIBGL_ALWAYS_SOFTWARE=1
# export WEBKIT_DISABLE_COMPOSITING_MODE=1
2026-01-15 16:11:28 +01:00
echo "Nix development environment loaded!"
echo "Available tools: rustc, cargo"
2026-01-15 16:11:28 +01:00
'';
}