X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/36229ef68a30c5a117599037d79fa1fc708fbfef..c781f79f3c8cb9a7577ee1574d196988da2719b3:/nix/package.nix diff --git a/nix/package.nix b/nix/package.nix index 41cd24f..c3fa562 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -3,13 +3,22 @@ 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.