Add nix flake
This commit is contained in:
@@ -35,9 +35,8 @@ speaker mappings, generated audio, and TTS endpoint stay on your computer.
|
||||
|
||||
## Requirements
|
||||
|
||||
- A reachable [Kokoro-FastAPI](docs/kokoro-fastapi.json) instance. Install and
|
||||
run it using the upstream [Kokoro-FastAPI instructions](https://github.com/remsky/Kokoro-FastAPI);
|
||||
Mudmouth uses `http://127.0.0.1:8880` by default.
|
||||
- A reachable [Kokoro-FastAPI](https://github.com/remsky/Kokoro-FastAPI) instance. Install and
|
||||
run it using the upstream instructions; Mudmouth uses `http://127.0.0.1:8880` by default.
|
||||
- An EverQuest log with `/log on`.
|
||||
|
||||
No `ffplay`, `mpv`, PipeWire command, or other external audio player is
|
||||
@@ -48,6 +47,24 @@ required; Mudmouth plays returned WAV audio itself.
|
||||
See [development and build notes](docs/development.md) for local setup,
|
||||
running Mudmouth, validation, and multi-platform release packaging.
|
||||
|
||||
### NixOS
|
||||
|
||||
Install the packaged application from this repository:
|
||||
|
||||
```bash
|
||||
nix profile install github:pleb/mudmouth
|
||||
mudmouth --log "$HOME/Games/EverQuestLegends/Logs/eqlog_Character_server.txt"
|
||||
```
|
||||
|
||||
Or run it without installing:
|
||||
|
||||
```bash
|
||||
nix run github:pleb/mudmouth -- --log "$HOME/Games/EverQuestLegends/Logs/eqlog_Character_server.txt"
|
||||
```
|
||||
|
||||
The flake includes the ALSA runtime dependency. Start Kokoro-FastAPI separately;
|
||||
Mudmouth connects to `http://127.0.0.1:8880` by default.
|
||||
|
||||
## TUI controls
|
||||
|
||||
| Key | Action |
|
||||
|
||||
Generated
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1784497964,
|
||||
"narHash": "sha256-vlHUuqAcbcH2RKmHbPiuQzbv1pnzzavXnI62RD0bqCU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "241313f4e8e508cb9b13278c2b0fa25b9ca27163",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
description = "Mudmouth, a classic-MUD-inspired EverQuest log reader";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
default = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "mudmouth";
|
||||
version = "0.0.2";
|
||||
src = self;
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
buildInputs = [ pkgs.alsa-lib ];
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "A classic-MUD-inspired EverQuest log reader with Kokoro voices";
|
||||
homepage = "https://github.com/pleb/mudmouth";
|
||||
license = licenses.mit;
|
||||
mainProgram = "mudmouth";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
apps = forAllSystems (system: {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.default}/bin/mudmouth";
|
||||
};
|
||||
});
|
||||
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
cargo
|
||||
rustc
|
||||
rustfmt
|
||||
clippy
|
||||
pkg-config
|
||||
alsa-lib
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user