Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
...
}:
{
packages = {
packages = rec {
glad = pkgs.callPackage ./nix/glad.nix { };
etc2comp = pkgs.callPackage ./nix/etc2comp.nix { };

Expand Down Expand Up @@ -52,6 +52,8 @@
libv8 = pkgs.nodejs_22.libv8;
};

overte-full-vulkan = overte-full.override { renderingBackend = "Vulkan"; };

# TODO: update/remove when overte updates to more modern version
draco = pkgs.callPackage ./nix/draco.nix { };

Expand Down
17 changes: 15 additions & 2 deletions nix/overte.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
libopus,
libsForQt5,
libv8,
vulkan-loader,
vulkan-headers,
vulkan-memory-allocator,

# tools for shader compilation
scribe,
Expand All @@ -43,9 +46,13 @@
buildClient ? true,
buildServer ? true,
buildTools ? false,
renderingBackend ? "OpenGL",
}:

assert renderingBackend == "OpenGL" || renderingBackend == "Vulkan";

stdenv.mkDerivation {
pname = "overte";
pname = "overte-${lib.toLower renderingBackend}";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe leave the opengl rendering to overte and make vulkan overte-vulkan

version = "unstable";
src =
let
Expand Down Expand Up @@ -122,11 +129,16 @@ stdenv.mkDerivation {
SDL2
libopus
libv8
];
] ++ (lib.optionals (renderingBackend == "Vulkan") [
vulkan-loader
vulkan-headers

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should that not be in the nativeBuildInputs?

vulkan-memory-allocator
]);

cmakeFlags = [
"-DOVERTE_USE_SYSTEM_LIBS=ON"
"-DOVERTE_BUILD_TYPE=NIGHLTY"
"-DOVERTE_RENDERING_BACKEND=${renderingBackend}"
]
++ lib.optional (!buildClient) "-DOVERTE_BUILD_CLIENT=OFF"
++ lib.optional (!buildServer) "-DOVERTE_BUILD_SERVER=OFF"
Expand Down Expand Up @@ -163,6 +175,7 @@ stdenv.mkDerivation {
ln -s "$I"/interface $out/bin/overte-client
makeWrapper "$I"/interface $out/bin/overte-client \
--unset QT_PLUGIN_PATH \
--set-default QT_QPA_PLATFORM xcb \
"''${qtWrapperArgs[@]}"
''
)
Expand Down