Files
ya-vla/devenv.nix

85 lines
1.6 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
pkgs,
lib,
config,
inputs,
...
}: {
packages = with pkgs; [
glxinfo
vulkan-tools
];
languages.c.enable = true;
languages.python = {
enable = true;
version = "3.12";
uv.enable = true;
venv.enable = true;
libraries =
(with pkgs; [
zlib
vulkan-loader
# OpenGL/EGL + DRI
libGL
libGLU
libGLX
libglvnd
mesa
egl-wayland
# Wayland
wayland
libxkbcommon
# Debug Toolseglinfo/glxinfo
mesa-demos
])
++ (
with pkgs.xorg; [
libXScrnSaver
libXrender
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libX11
libXcomposite
libxshmfence
libXtst
libxcb
]
);
};
env = rec {
NIX_LD_LIBRARY_PATH = "$NIX_LD_LIBRARY_PATH:/usr/lib/wsl/lib/";
LD_LIBRARY_PATH = NIX_LD_LIBRARY_PATH;
GLVND = "${pkgs.libglvnd}";
MESA = "${pkgs.mesa}";
MESAD = MESA;
GALLIUM_DRIVER = "d3d12";
MESA_D3D12_DEFAULT_ADAPTER_NAME = "NVIDIA";
# LIBGL_ALWAYS_INDIRECT = 0;
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
# __NV_PRIME_RENDER_OFFLOAD = 1;
# __VK_LAYER_NV_optimus = "NVIDIA_only";
# PYOPENGL_PLATFORM = "egl";
# EGL_PLATFORM = "wayland";
# __EGL_VENDOR_LIBRARY_DIRS = "${MESA}/share/glvnd/egl_vendor.d:${GLVND}/share/glvnd/egl_vendor.d";
# LIBGL_DRIVERS_PATH = "${MESA}/lib/dri";
};
# https://devenv.sh/basics/
enterShell = ''
git --version # Use packages
'';
}