generated from GarandPLG/rust-flake-template
30f2e17ed7
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`.
26 lines
478 B
Nix
26 lines
478 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
pkg-config,
|
|
alsa-lib,
|
|
}:
|
|
rustPlatform.buildRustPackage {
|
|
name = "war-in-tunnels";
|
|
pname = "war-in-tunnels";
|
|
version = "0.1.0";
|
|
|
|
src = ./.;
|
|
buildInputs = [alsa-lib];
|
|
nativeBuildInputs = [pkg-config];
|
|
cargoHash = lib.fakeHash;
|
|
|
|
meta = {
|
|
description = "TUI underground game";
|
|
homepage = "https://gitea.garandplg.com/GarandPLG/war-in-tunnels";
|
|
license = lib.licenses.mit;
|
|
maintainers = [
|
|
"Garand_PLG"
|
|
];
|
|
};
|
|
}
|