{ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; outputs = { self, nixpkgs, }: let inherit (self) outputs; supportedSystems = ["x86_64-linux"]; forEachSupportedSystem = nixpkgs.lib.genAttrs supportedSystems; in { devShells = forEachSupportedSystem (system: let pkgs = import nixpkgs {inherit system;}; in { # TODO: maybe use nightly? # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#using-rust-nightly-with-nix-shell-using-rust-nightly-with-nix-shell # TODO: packages # TODO: checks rust-dev = pkgs.mkShell rec { nativeBuildInputs = with pkgs; [pkg-config]; buildInputs = with pkgs; [ clang cargo rustc rustfmt rustPackages.clippy rust-analyzer mold # source: https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md#nix udev alsa-lib vulkan-loader xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr libxkbcommon wayland ]; LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; }; default = outputs.devShells.${system}.rust-dev; }); }; }