Add audio deps; extract input handling to threads

Add ALSA and Rodio crates to Cargo.toml and lockfile to enable audio
playback.
Update Nix expressions to include `alsa-lib` as a build input.
Refactor input event handling into a new `app::threads` module:
 - Define `AppEvent` enum and `handle_input_events` function there.
 - Adjust imports in `app/app.rs` and `main.rs` accordingly.
   Remove the now‑unused `handle_input_events` and `AppEvent`
   definitions from
   `app/app.rs`.
This commit is contained in:
2026-04-06 11:47:46 +02:00
parent 92ace142b4
commit 30f2e17ed7
11 changed files with 954 additions and 59 deletions
+3 -2
View File
@@ -42,15 +42,16 @@
develop = naerskLib.buildPackage {
name = "war-in-tunnels";
src = ./.;
# buildInputs = with pkgs; [];
buildInputs = with pkgs; [alsa-lib];
nativeBuildInputs = with pkgs; [pkg-config];
};
};
devShells.${system}.default = pkgs.mkShell {
env.RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
buildInputs = [
buildInputs = with pkgs; [
rustToolchain
alsa-lib
];
nativeBuildInputs = with pkgs; [pkg-config];