{ inputs = { }; outputs = { self, nixpkgs, flake-utils, fenix }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [ fenix.overlays.default ]; }; toolchain = pkgs.fenix.stable; neededLibs = with pkgs; (with xorg; [ libX11 libXcursor libXrandr libXi ]) ++ [ vulkan-loader wayland wayland-protocols libxkbcommon ]; flakePkgs = rec { }; in rec { packages = flake-utils.lib.flattenTree flakePkgs; devShell = pkgs.mkShell { inputsFrom = with flakePkgs; [ ]; shellHook = '' export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${ pkgs.lib.makeLibraryPath neededLibs }" ''; packages = (with pkgs; [ cargo-deny cargo-edit cargo-watch cmake pkg-config ]) ++ (with toolchain; [ cargo rustc clippy # Get the nightly version of rustfmt so we can wrap comments pkgs.fenix.default.rustfmt ]); PKG_CONFIG_PATH = with pkgs; lib.concatStringsSep ":" [ "${expat.dev}/lib/pkgconfig" "${fontconfig.dev}/lib/pkgconfig" "${freetype.dev}/lib/pkgconfig" ]; }; }); }