Add nix flake
CI / macos-latest (push) Has been cancelled
CI / ubuntu-latest (push) Has been cancelled
CI / windows-latest (push) Has been cancelled

This commit is contained in:
pleb
2026-07-21 10:50:03 -07:00
parent 290d0674b1
commit d7527a9319
3 changed files with 97 additions and 3 deletions
+2 -3
View File
@@ -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
Generated
+27
View File
@@ -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
}
+68
View File
@@ -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
];
};
}
);
};
}