mirror of
https://github.com/SikongJueluo/ya-vla.git
synced 2025-12-20 06:27:49 +08:00
feat(project): support nixos
This commit is contained in:
84
devenv.nix
Normal file
84
devenv.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
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 Tools(eglinfo/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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user