From b6200cdeed062f4904192000fcc45fed79fba526 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 9 Aug 2026 11:34:16 +0000 Subject: [PATCH] moshi: 0.2.5 -> 0.2.12 Diff: https://github.com/kyutai-labs/moshi/compare/v0.2.5...moshi-v0.2.12 --- pkgs/by-name/mo/moshi/package.nix | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/mo/moshi/package.nix b/pkgs/by-name/mo/moshi/package.nix index 2e269857d4f8..337e09c599b5 100644 --- a/pkgs/by-name/mo/moshi/package.nix +++ b/pkgs/by-name/mo/moshi/package.nix @@ -43,18 +43,18 @@ let in rustPlatform.buildRustPackage (finalAttrs: { pname = "moshi"; - version = "0.2.5"; + version = "0.2.12"; src = fetchFromGitHub { owner = "kyutai-labs"; repo = "moshi"; - tag = "v${finalAttrs.version}"; - hash = "sha256-MkZsLRQE5Swdyp9l/cvPvznWxRfKuYecj+TTgb3ufKU="; + tag = "moshi-v${finalAttrs.version}"; + hash = "sha256-Q+3amcF3T53z/ViCBmjpyfJmZVoRAGzP4yBsnorjxU8="; }; sourceRoot = "${finalAttrs.src.name}/rust"; - cargoHash = "sha256-BxV8oZlN+6cVb3GwhY7TKWxHEpY3WVEhN6A6+5NMOyU="; + cargoHash = "sha256-C8q0WaDYrLopuuVNjtmXJaPSCojGHfPv+VwWGbY5VBU="; nativeBuildInputs = [ pkg-config @@ -97,6 +97,9 @@ rustPlatform.buildRustPackage (finalAttrs: { env = { # use system oniguruma RUSTONIG_SYSTEM_LIBONIG = true; + + # Otherwise the build fails with python>=3.14 + PYO3_USE_ABI3_FORWARD_COMPATIBILITY = true; } // lib.optionalAttrs config.cudaSupport { CUDA_COMPUTE_CAP = cudaCapability'; @@ -120,7 +123,10 @@ rustPlatform.buildRustPackage (finalAttrs: { ); }; updateScript = nix-update-script { - extraArgs = [ "--generate-lockfile" ]; + extraArgs = [ + "--generate-lockfile" + "--version-regex=moshi-v(.*)" + ]; }; }; @@ -133,5 +139,15 @@ rustPlatform.buildRustPackage (finalAttrs: { maintainers = with lib.maintainers; [ GaetanLepage ]; platforms = lib.platforms.all; mainProgram = "moshi-cli"; + problems = lib.optionalAttrs (config.cudaSupport && (cudaPackages.cudaAtLeast "12.9")) { + unsupported-cuda-version = { + message = '' + cudaPackages is too new (${cudaPackages.cudaMajorMinorVersion}). + Version 0.16.2 of the cudarc crate asks for a CUDA version older than 12.9. + Please override cudaPackages with an older version. + ''; + kind = "broken"; + }; + }; }; })