Skip to content

Runtime error when running on Nixos and wayland #53

@ghost

Description

I encountered an issue when running Vulkan on Wayland. After launching the application, it throws the following runtime error:

terminate called after throwing an instance of 'std::runtime_error'
  what():  validation layers requested, but not available!
Aborted (core dumped)

shell.nix

{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
  buildInputs = with pkgs; [
    glslang
    bash
    cmake
    vulkan-tools
    vulkan-utility-libraries
    vulkan-validation-layers
    vulkan-headers
    vulkan-loader
    glfw-wayland
    glm
    git
    clang
    ninja
  ];

  shellHook = ''
    # Set CC and CXX to use Clang
    export CC=${pkgs.clang}/bin/clang
    export CXX=${pkgs.clang}/bin/clang++
  '';
}

The window also doesn't launch after the code from the first lesson on Wayland.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions