Skip to content

Commit

Permalink
tabby: darwin sdk refactor; 0.18.0 -> 0.19.0 (#352908)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored Nov 3, 2024
2 parents c68cdfe + 3fe4bdd commit 181c598
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 37 deletions.
35 changes: 18 additions & 17 deletions pkgs/by-name/ta/tabby/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 8 additions & 20 deletions pkgs/by-name/ta/tabby/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@

llama-cpp,

apple-sdk_15,
autoAddDriverRunpath,
cudaSupport ? config.cudaSupport,
versionCheckHook,

cudaSupport ? config.cudaSupport,
rocmSupport ? config.rocmSupport,

darwin,
metalSupport ? stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64,

# one of [ null "cpu" "rocm" "cuda" "metal" ];
acceleration ? null,
versionCheckHook,
}:

let
Expand All @@ -33,7 +31,7 @@ let
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/ollama/default.nix

pname = "tabby";
version = "0.18.0";
version = "0.19.0";

availableAccelerations = flatten [
(optional cudaSupport "cuda")
Expand Down Expand Up @@ -106,19 +104,9 @@ let
# TODO(ghthor): some of this can be removed
darwinBuildInputs =
[ llamaccpPackage ]
++ optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks;
[
Foundation
Accelerate
CoreVideo
CoreGraphics
]
++ optionals enableMetal [
Metal
MetalKit
]
);
++ optionals stdenv.hostPlatform.isDarwin ([
apple-sdk_15
]);

cudaBuildInputs = [ llamaccpPackage ];
rocmBuildInputs = [ llamaccpPackage ];
Expand All @@ -132,7 +120,7 @@ rustPlatform.buildRustPackage {
owner = "TabbyML";
repo = "tabby";
rev = "refs/tags/v${version}";
hash = "sha256-8clEBWAT+HI2eecOsmldgRcA58Ehq9bZT4ZwUMm494g=";
hash = "sha256-RK81gQ5IUzZ4HXJbKBr5bqayH0Xip6ZVAgdMwqP+kx8=";
fetchSubmodules = true;
};

Expand Down

0 comments on commit 181c598

Please sign in to comment.