buildGoModule,
src,
version,
+ callPackage,
+ whisper-cpp,
}:
+let
+ model = (callPackage ./voice-model.nix { }).small;
+in
buildGoModule {
pname = "onechat";
inherit src version;
subPackages = [ "." ];
- ldflags = [ "-X main.version=${version}" ];
+ ldflags = [
+ "-X main.version=${version}"
+ "-X main.voiceTranscriberPath=${whisper-cpp}/bin/whisper-cli"
+ "-X main.voiceModelPath=${model}"
+ ];
vendorHash = "sha256-nRDUAGSXAK5/L2xyfDh3NbMOZmrGGEIm4vtgfWsxHYU=";
# The flake check runs the full replay.