Newest Blender from unstable (pkgsRocm for HIP, hiPrio over desktop-apps' copy), python3 and git-lfs for the harness and project repos, the harness's bin first on PATH, Tripo CLI telemetry off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
121 lines
3.0 KiB
Nix
121 lines
3.0 KiB
Nix
{ pkgs, lib, inputs, ... }:
|
|
|
|
# Unreal Engine: Epic's prebuilt Linux zip in an FHS env. The zip is behind an
|
|
# Epic login, so it's unpacked by hand to engineDir rather than fetched by Nix.
|
|
let
|
|
engineDir = "/mnt/ssd_01/unreal/UE_5.8.4";
|
|
|
|
fhs = name: runScript: pkgs.buildFHSEnv {
|
|
inherit name runScript;
|
|
targetPkgs = p: with p; [
|
|
# Editor
|
|
vulkan-loader
|
|
vulkan-tools # vulkaninfo, to debug from unreal-shell
|
|
libGL
|
|
libxkbcommon
|
|
wayland
|
|
alsa-lib
|
|
libpulseaudio
|
|
udev
|
|
fontconfig
|
|
freetype
|
|
zlib
|
|
stdenv.cc.cc.lib
|
|
libxcrypt-legacy
|
|
util-linux.lib
|
|
libx11
|
|
libxcb
|
|
libxcursor
|
|
libxext
|
|
libxfixes
|
|
libxi
|
|
libxinerama
|
|
libxrandr
|
|
libxrender
|
|
libxscrnsaver
|
|
libxtst
|
|
libsm
|
|
libice
|
|
|
|
# CEF (Fab, web browser widgets)
|
|
at-spi2-atk
|
|
at-spi2-core
|
|
atk
|
|
cairo
|
|
cups
|
|
dbus
|
|
expat
|
|
glib
|
|
gtk3
|
|
libdrm
|
|
libgbm
|
|
libxcomposite
|
|
libxdamage
|
|
nspr
|
|
nss
|
|
pango
|
|
|
|
# UnrealBuildTool (bundled .NET) and C++ project builds
|
|
icu
|
|
krb5
|
|
openssl
|
|
bash
|
|
coreutils
|
|
file
|
|
findutils
|
|
gawk
|
|
git
|
|
gnugrep
|
|
gnumake
|
|
gnused
|
|
rsync
|
|
which
|
|
xdg-utils
|
|
];
|
|
# The session exports wayland; the editor's windowing targets X11.
|
|
# hyprchrome-claude's LD_LIBRARY_PATH needs a newer glibc than this env's.
|
|
profile = ''
|
|
export SDL_VIDEODRIVER=x11
|
|
unset LD_LIBRARY_PATH
|
|
'';
|
|
};
|
|
|
|
editor = fhs "unreal-editor" "${engineDir}/Engine/Binaries/Linux/UnrealEditor";
|
|
shell = fhs "unreal-shell" "bash"; # RunUAT, project builds, debugging
|
|
|
|
# nixpkgs 26.05 has Blender 5.1; the game-dev harness (projects/.harness) wants
|
|
# the newest one. pkgsRocm, as in desktop-apps: Cycles needs HIP on the RX 6800 XT.
|
|
# hiPrio wins the bin/blender collision with desktop-apps.nix's pkgsRocm.blender.
|
|
unstable = import inputs.nixpkgs-unstable {
|
|
inherit (pkgs.stdenv.hostPlatform) system;
|
|
config = pkgs.config;
|
|
};
|
|
|
|
desktopItem = pkgs.makeDesktopItem {
|
|
name = "unreal-editor";
|
|
desktopName = "Unreal Editor";
|
|
exec = "unreal-editor %F";
|
|
categories = [ "Development" "IDE" ];
|
|
startupWMClass = "UnrealEditor";
|
|
};
|
|
in
|
|
{
|
|
environment.systemPackages = [
|
|
editor
|
|
shell
|
|
desktopItem
|
|
pkgs.python3 # the harness tools (ue, blender, asset_pipe, ...) are Python
|
|
(lib.hiPrio unstable.pkgsRocm.blender)
|
|
pkgs.git-lfs # the project repos (LANfall, ...) keep their assets in LFS
|
|
];
|
|
|
|
# The game-dev harness's commands (ue, blender, asset_pipe, tripo_studio, ...). First on PATH: its `blender`
|
|
# wraps the real one (and finds it further down PATH). The harness's own setup is .harness/setup.sh.
|
|
environment.extraInit = ''
|
|
export PATH="/mnt/ssd_01/unreal/projects/.harness/bin:$PATH"
|
|
'';
|
|
environment.sessionVariables.TRIPO_ANALYTICS_ENABLED = "0"; # Tripo CLI telemetry off
|
|
|
|
systemd.tmpfiles.rules = [ "d /mnt/ssd_01/unreal 0755 darman users -" ];
|
|
}
|