{ pkgs ? import (import ./nix/sources.nix).nixpkgs { overlays = [ (self: super: { "format" = pkgs.writers.writeDashBin "format" '' set -efu cd ${self.lib.escapeShellArg (toString ./.)} find src -iname '*.rs' -exec ${pkgs.rustfmt}/bin/rustfmt '{}' \; ''; "watch" = pkgs.writers.writeDashBin "watch" '' set -efu cd ${self.lib.escapeShellArg (toString ./.)} find src -iname '*.rs' | entr -rs 'clear; cargo check' ''; }) ]; } }: let inherit (pkgs) lib; in pkgs.mkShell rec { nativeBuildInputs = [ pkgs.cargo pkgs.format pkgs.pkg-config pkgs.rustc pkgs.rustfmt pkgs.watch ]; buildInputs = [ pkgs.alsa-lib pkgs.libxkbcommon pkgs.udev pkgs.vulkan-loader pkgs.wayland pkgs.xorg.libX11 pkgs.xorg.libXcursor pkgs.xorg.libXi pkgs.xorg.libXrandr ]; LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; }