diff --git a/pkgs/by-name/mi/mistral-rs/package.nix b/pkgs/by-name/mi/mistral-rs/package.nix index 760ba33786d0..88733f003905 100644 --- a/pkgs/by-name/mi/mistral-rs/package.nix +++ b/pkgs/by-name/mi/mistral-rs/package.nix @@ -73,14 +73,14 @@ let in rustPlatform.buildRustPackage (finalAttrs: { pname = "mistral-rs"; - version = "0.8.3"; + version = "0.8.4"; __structuredAttrs = true; src = fetchFromGitHub { owner = "EricLBuehler"; repo = "mistral.rs"; tag = "v${finalAttrs.version}"; - hash = "sha256-Ohkr45VXuXB7Ms8igZxQ7shrJa3+WBVT1fNYlc6JvZQ="; + hash = "sha256-BSP8fi4grbEzGOfR4tGCJVjIom/1d2mnFrK8O6BRWL4="; }; patches = [ @@ -94,9 +94,22 @@ rustPlatform.buildRustPackage (finalAttrs: { --replace-fail \ "lto = true" \ "lto = false" + '' + # Prevent build scripts from attempting to clone cutlass (which would fail in the sandbox anyway). + # Instead, we provide cutlass in buildInputs. + + lib.optionalString cudaSupport '' + substituteInPlace mistralrs-flash-attn/build.rs \ + --replace-fail \ + ".with_cutlass(Some(CUTLASS_COMMIT))" \ + "" + + substituteInPlace mistralrs-quant/build.rs \ + --replace-fail \ + 'builder = builder.with_cutlass(Some("7d49e6c7e2f8896c47f586706e67e1fb215529dc"));' \ + "" ''; - cargoHash = "sha256-ZwUCzbRpDgT7KwsT9kPGsGp4iU/0I+lrMFqM3UCwkYw="; + cargoHash = "sha256-T4TPm31fihx9ZvQ6jme67yrc0osl4c9CiAm4+rISgFs="; nativeBuildInputs = [ pkg-config @@ -121,6 +134,9 @@ rustPlatform.buildRustPackage (finalAttrs: { cudaPackages.cuda_nvrtc cudaPackages.libcublas cudaPackages.libcurand + + # For compiling kernels + cudaPackages.cutlass ] ++ lib.optionals mklSupport [ mkl ];