Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix shell in docs wrong after winit update. #12664

Closed
Olle-Lukowski opened this issue Mar 23, 2024 · 1 comment
Closed

Nix shell in docs wrong after winit update. #12664

Olle-Lukowski opened this issue Mar 23, 2024 · 1 comment
Labels
C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled

Comments

@Olle-Lukowski
Copy link
Contributor

Ever since #10702, winit needs libxkbcommon-x11. This was mentioned in the docs for Ubuntu (since #11060), but not for other distros. I ran into this issue today when trying to run a bevy app with DefaultPlugins on my fresh NixOS installation. This should probably be mentioned on the docs.

@Olle-Lukowski Olle-Lukowski added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled labels Mar 23, 2024
@Olle-Lukowski
Copy link
Contributor Author

Never mind, I didn't have my flake setup properly. For anyone who wants a working flake:

{
  description = "A basic flake with a shell";
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";
  inputs.rust-overlay.url = "github:oxalica/rust-overlay";

  outputs = { nixpkgs, rust-overlay, flake-utils, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
	overlays = [ (import rust-overlay) ];
        pkgs = import nixpkgs {
          inherit system overlays;
        };
      in
      {
        devShells.default = pkgs.mkShell rec {
	  nativeBuildInputs = with pkgs; [
	    pkg-config
	  ];
          buildInputs = with pkgs; [ 
	    (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default))

	    lld clang 

	    udev alsa-lib vulkan-loader
	    xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature
	    libxkbcommon wayland # To use the wayland feature
	  ];

	  LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
        };
      });
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled
Projects
None yet
Development

No branches or pull requests

1 participant