UnrealEngine 5.5. Install and error

Bonjour, je viens vers vous parce que j’utilise nixos, et je débute, j’essaie d’installer unreal engine 5.5, sur nix os, mais ça ne marche pas, évidement, quand je fais bash setup sh, j’ai du faire bash steam setup quelque chose comme, pour contourner le problème, après, quand j’ai fait generate.sh, ca a marcher sans erreurs, et impossible de faire un make après, j’ai fait quelques test, à côté et ça n’a pas marcher. En gros, je cherche sur ce qui est dit sur internet, et nix os pour installer unrealengine mais rien de propre…

Si quelqu’un peut m’aider, je serais bien content de me dépanner ?

Hello, I’m contacting you because I’m using Nixos, and I’m a beginner. I’m trying to install Unreal Engine 5.5 on Nixos, but it’s not working. Obviously, when I do bash setup sh, I had to do something like bash steam setup to get around the problem. Then, when I did generate.sh, it worked without errors, and it was impossible to do a make afterward. I did some tests, and it didn’t work. Basically, I’m looking for what’s said on the internet, and Nixos to install Unreal Engine, but nothing clean.

If anyone can help me, I’d be happy to help me out.

(Google translate, not sur of the translation sorry by advanced.)

Properly packaging a project as large as Unreal Engine may not be feasible for a Nix beginner.

So perhaps alternatives could be considered such as usage of nix-ld.

I’ve been hearing of Distrobox recently, as well.

Salut, finalement je l’ai télécharger sur epic pour la version linux. Je n’ai pas encore tester si ca fonctionne. Mais merci.

Hi, I finally downloaded it from epic for the linux version. I haven’t tested it yet if it works. But thanks.
regards.

Hi there! Using Unreal Engine 5 on NixOS can be really cumbersome and isn’t fully functional. If it’s feasible, I would recommend either not using UE5 altogether, or dual-booting a Ubuntu distribution to stick with what Epic develops the engine for. However, it’s not impossible to run the engine on NixOS.

The easiest way is to download the pre-compiled binaries that Epic provides and run a program like nix-ld or nix-alien that allows you to run dynamically linked binaries. Fortunately you won’t have to do any digging around to find the needed packages, since others have already found them (scroll to the bottom of the page).

If you want to build the engine from source, you’ll have to become familiar with the autoPatchelf and patchShebangs tools to make the build process work correctly. autoPatchelf makes it so that the binary files that Epic provides will be linked to their nixpkgs equivalent, while patchShebangs fixes all of the script headings that point to an interpreter. You’ll also most likely have to give up some of the engine’s functionality as there are several third party plugins and features that are not able to be patched since the libraries aren’t publicly available.

And if you get past all of that, you might run into issues actually building an Unreal project itself (although I’ll fully admit that that might be a skill issue on my part). Best of luck whichever path you go down, and I hope you have better luck than I did!

1 Like

(English Below)

Salut @12qs1.

Si tu veux utiliser Unreal Engine sur NixOS, je te recommande de passer par ton environnement de projet. J’ai fait un FHS pour builder un projet et lancer Unreal dedans.
Note que tu auras toujours quelques problèmes avec Unreal, notamment pas de Hot Reload et quelques bugs de contrôles (pas possible de taper une recherche dans les blueprints)

J’ai détaillé la méthode ici : UE5 (Unreal Engine 5 Game Engine) · Issue #124963 · NixOS/nixpkgs · GitHub

Il faut :

  • Installer VSCode/VSCodium et direnv
  • Ajouter le fichier shell.nix suivant au projet :
{ pkgs ? import <nixpkgs> {} }: let
  stdenv = pkgs.llvmPackages_18.stdenv;
  dotnetPkg = (with pkgs.dotnetCorePackages; combinePackages [
      sdk_9_0
    ]);
  deps = (with pkgs; [
    zlib
    zlib.dev
    openssl
    dotnetPkg
  ]);
in
(pkgs.buildFHSEnv {
  name = "UnrealEditor";

  targetPkgs = pkgs: (with pkgs;
  [ udev
    alsa-lib
    mono
    dotnet-sdk
    stdenv
    clang_18
    icu
    openssl
    zlib
    SDL2
    SDL2.dev
    SDL2 SDL2_image SDL2_ttf SDL2_mixer
    vulkan-loader
    vulkan-tools
    vulkan-validation-layers
    glib
    libxkbcommon
    nss
    nspr
    atk
    mesa
    dbus
    pango
    cairo
    libpulseaudio
    libGL
    expat
    libdrm
    wayland
  ]) ++ (with pkgs.xorg;
  [ 
    libICE
    libSM
    libX11
    libxcb
    libXcomposite
    libXcursor
    libXdamage
    libXext
    libXfixes
    libXi
    libXrandr
    libXrender
    libXScrnSaver
    libxshmfence
    libXtst
  ]);

  # runScript = "zsh";

  NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath ([
    stdenv
  ] ++ deps);
  NIX_LD = "${stdenv.cc.libc_bin}/bin/ld.so";
  nativeBuildInputs = [ 
  ] ++ deps;

  shellHook = ''
    DOTNET_ROOT="${dotnetPkg}";
    DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1;
  '';
}).env

  • Ajouter le fichier .envrc suivant au projet :
use nix

# marche aussi avec flakes si tu sais faire
  • Activer direnv (direnv allow & direnv reload)
  • Générer un projet à partir du terminal
dotnet <PathToEngine>/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll -ProjectFiles "<PathToProject>/<YourProject>.uproject" -VSCode
  • Build le projet en mode Editor
make <YourProject>Editor

# si pas de Makefile, cette commande devrait faire la même chose
"<PathToEngine>/Engine/Build/BatchFiles/RunUBT.sh" <YourProject>Editor Linux Development  -Project="<PathToProject>/<YourProject>.uproject"
  • Lancer Unreal Engine à partir du terminal
<PathToEngine>/Engine/Binaries/Linux/UnrealEditor -Project="<PathToProject>/<YourProject>.uproject"

English translation:

If you want to use Unreal Engine in NixOS, I recommend using a project build environment. I made one to build a project and run Unreal with it.
Please note you’ll still have inconveniences with Unreal, like the lack of Hot Reload et some input issues (not possible to search terms in blueprints)

I explained how here : UE5 (Unreal Engine 5 Game Engine) · Issue #124963 · NixOS/nixpkgs · GitHub

You will need to :

  • install VSCode/VSCodium and direnv
  • Add this shell.nix file to your project :
{ pkgs ? import <nixpkgs> {} }: let
  stdenv = pkgs.llvmPackages_18.stdenv;
  dotnetPkg = (with pkgs.dotnetCorePackages; combinePackages [
      sdk_9_0
    ]);
  deps = (with pkgs; [
    zlib
    zlib.dev
    openssl
    dotnetPkg
  ]);
in
(pkgs.buildFHSEnv {
  name = "UnrealEditor";

  targetPkgs = pkgs: (with pkgs;
  [ udev
    alsa-lib
    mono
    dotnet-sdk
    stdenv
    clang_18
    icu
    openssl
    zlib
    SDL2
    SDL2.dev
    SDL2 SDL2_image SDL2_ttf SDL2_mixer
    vulkan-loader
    vulkan-tools
    vulkan-validation-layers
    glib
    libxkbcommon
    nss
    nspr
    atk
    mesa
    dbus
    pango
    cairo
    libpulseaudio
    libGL
    expat
    libdrm
    wayland
  ]) ++ (with pkgs.xorg;
  [ 
    libICE
    libSM
    libX11
    libxcb
    libXcomposite
    libXcursor
    libXdamage
    libXext
    libXfixes
    libXi
    libXrandr
    libXrender
    libXScrnSaver
    libxshmfence
    libXtst
  ]);

  # runScript = "zsh";

  NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath ([
    stdenv
  ] ++ deps);
  NIX_LD = "${stdenv.cc.libc_bin}/bin/ld.so";
  nativeBuildInputs = [ 
  ] ++ deps;

  shellHook = ''
    DOTNET_ROOT="${dotnetPkg}";
    DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1;
  '';
}).env

  • Add this .envrc file to your project:
use nix

# also works with flakes if you know how to make one
  • Activate direnv (direnv allow & direnv reload)
  • Generate your project from terminal
dotnet <PathToEngine>/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll -ProjectFiles "<PathToProject>/<YourProject>.uproject" -VSCode
  • Build the project in Editor mode
make <YourProject>Editor

# this should run a similar command, if you don't have it
"<PathToEngine>/Engine/Build/BatchFiles/RunUBT.sh" <YourProject>Editor Linux Development  -Project="<PathToProject>/<YourProject>.uproject"
  • Run Unreal Engine from terminal
<PathToEngine>/Engine/Binaries/Linux/UnrealEditor -Project="<PathToProject>/<YourProject>.uproject"
1 Like