Skip to content

Draft: Nixos support#1782

Merged
RTUnreal merged 10 commits intooverte-org:masterfrom
RTUnreal:nixos_support
Jan 3, 2026
Merged

Draft: Nixos support#1782
RTUnreal merged 10 commits intooverte-org:masterfrom
RTUnreal:nixos_support

Conversation

@RTUnreal
Copy link
Collaborator

@RTUnreal RTUnreal commented Aug 29, 2025

This PR adds a nix package build via flake.nix.

Due to overte's dependency on node18, this PR is currently blocked until that is updated.
This is due to node18, at least in nixpkgs, requires icu75, but everything else needs icu76.
Done

Dependencies/before this PR:

@RTUnreal RTUnreal marked this pull request as draft August 29, 2025 18:50
@RTUnreal RTUnreal force-pushed the nixos_support branch 2 times, most recently from f4cc0c5 to 392675b Compare August 29, 2025 19:07
@RTUnreal RTUnreal force-pushed the nixos_support branch 2 times, most recently from 811ea5a to 16eed3c Compare August 30, 2025 10:13
@RTUnreal RTUnreal requested a review from JulianGro August 30, 2025 10:27
@RTUnreal
Copy link
Collaborator Author

RTUnreal commented Aug 31, 2025

Also to note as of a week ago, qt5.qtwebengine is marked as insecure, as it contains a lot of unfixed CVEs, due to qt5webengine not being maintained anymore upstream. 1

@RTUnreal RTUnreal force-pushed the nixos_support branch 2 times, most recently from ba2ca76 to 38dc759 Compare September 3, 2025 18:57
@RTUnreal RTUnreal force-pushed the nixos_support branch 3 times, most recently from 22fb041 to db617ac Compare September 20, 2025 14:02
@RTUnreal RTUnreal force-pushed the nixos_support branch 3 times, most recently from 84639e1 to ea26bc7 Compare December 22, 2025 13:09
RTUnreal and others added 2 commits December 22, 2025 16:56
Co-authored-by: Julian Groß  <julian.g@posteo.de>
Co-authored-by: Julian Groß  <julian.g@posteo.de>
@RTUnreal RTUnreal marked this pull request as ready for review December 30, 2025 07:49
@JulianGro
Copy link
Member

Overte appears to build successfully, but it doesn't start on my machine:

juliangro@x299-workstation ~> export NIXPKGS_ALLOW_INSECURE=1
juliangro@x299-workstation ~> nix --extra-experimental-features flakes --extra-experimental-features nix-command build --impure github:RTUnreal/overte?ref=nixos_support

juliangro@x299-workstation ~> nix --extra-experimental-features flakes --extra-experimental-features nix-command run --impure github:RTUnreal/overte?ref=nixos_support
[12/30 14:18:26] [DEBUG] [hifi.shared] Settings file: "/home/juliangro/.config/Overte - Dev/Interface.json"
[12/30 14:18:26] [DEBUG] [settings.manager] Initializing settings write thread
[12/30 14:18:26] [WARNING] [default] QEventLoop: Cannot be used without QApplication
Gtk-Message: 14:18:26.743: Failed to load module "xapp-gtk3-module"
[12/30 14:18:26] [WARNING] [qt.glx] qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
[Previous message was repeated 1 times]
[12/30 14:18:26] [FATAL] [default] Could not initialize GLX
fish: Job 1, 'nix --extra-experimental-featur…' terminated by signal SIGABRT (Abbruch)
juliangro@x299-workstation ~ [SIGABRT]>

I would presume Gtk-Message: 14:18:26.743: Failed to load module "xapp-gtk3-module" to be irrelevant, since it looks similar to other Gtk warnings on Cinnamon.

nix --extra-experimental-features flakes --extra-experimental-features nix-command log --impure github:RTUnreal/overte?ref=nixos_support >> nix.log

nix.log

@RTUnreal
Copy link
Collaborator Author

RTUnreal commented Dec 30, 2025

After looking through opengl docs for NixOS, I remembered, you are not able to just run GL/VK apps from nix on non-nix systems, you would need to either install NixOS and run it there or use a solution like nix-system-graphics1 to run it. (This requires global changes to your system). There is also the nixGL tool2, which wraps the app to use non-nix GL.

I recommend in this order:

  1. NixOS
  2. NixGL
  3. nix-system-graphics

I will also look into more ergonomic ways to test nix stuff on non-nix systems

Copy link
Member

@JulianGro JulianGro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The STEAMWORKS/STEAMCLIENT stuff is the only thing that really needs fixing. Everything else, I don't care too much about, unless we start officially supporting Nix.

Comment on lines +76 to +97
glad
etc2comp
cgltf
polyvox
gif_creator
artery-font-format
openssl
libGL
glm
nlohmann_json
tbb_2022
webrtc-audio-processing
nvidia-texture-tools
openexr
draco
bullet
discord-rpc
openvr
openxr-loader
SDL2
libopus
libv8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these defined here, when they were already defined in the unnamed curly braces at the top?

Copy link
Collaborator Author

@RTUnreal RTUnreal Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The top is just the function head inside the nix language. When we call pkgs.callPackage from flake.nix, we ask the function to automatically fill in the dependencies as variables for us to use. buildClient for example is just a variable, that can be changed inside of the curly braces in that function call. One can also set specific versions for specific dependencies, like for libv8.

Here we define how the dependencies should be consumed and in which relation, they stand to the overte package, I.e. qt will be required at deployment (buildInputs), but cmake is only only at build time (nativeBuildInputs).

the weird naming is because of legacy code

RTUnreal and others added 4 commits December 30, 2025 15:55
Co-authored-by: Julian Groß  <julian.g@posteo.de>
Co-authored-by: Julian Groß  <julian.g@posteo.de>
Co-authored-by: Julian Groß  <julian.g@posteo.de>
Co-authored-by: Julian Groß  <julian.g@posteo.de>
@RTUnreal RTUnreal requested a review from JulianGro December 31, 2025 14:03
Copy link
Member

@JulianGro JulianGro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the "-DOVERTE_BUILD_TYPE=NIGHLTY", but this PR is good to merge from my point of view.

@RTUnreal
Copy link
Collaborator Author

RTUnreal commented Jan 3, 2026

I don't like the "-DOVERTE_BUILD_TYPE=NIGHLTY", but this PR is good to merge from my point of view.

I will add a second PR, which detects, when a build is not in a clean build, so it build it in DEV

@RTUnreal RTUnreal merged commit 35acf70 into overte-org:master Jan 3, 2026
2 of 3 checks passed
@RTUnreal RTUnreal deleted the nixos_support branch January 3, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants