Closed VirgileHenry closed 11 months ago
Please, read the documentation on how to use your system. Winit uses dlopen.
Thanks for the quick reply. I'm trying my best, and I've also tried to use the following flake :
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs?ref=release-21.11";
};
outputs = {
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in with pkgs; rec {
devShell = mkShell rec {
buildInputs = [
libxkbcommon
libGL
# WINIT_UNIX_BACKEND=wayland
wayland
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
RUST_BACKTRACE="full";
};
});
}
Which effectively sets the path for the wayland lib, but with this there is no window at all (the program runs and that's it)
(the program runs and that's it)
You must draw on Wayland to have your window shown.
For people still searching for a solution, I found one which works for me here: https://eu90h.com/wgpu-winit-and-nixos.html
I'm trying to run winit on NixOs, under wayland and I hit this error :
(This is with the rust backtrace set to 1, I can run it with
full
if required.) I'm running this minimal example :I've also tried creating the event loop with:
Which have the same effects.
This is all run into an nix shell where I imported the wayland libs:
Maybe I'm missing something ? Any help would be helpful.