diff options
Diffstat (limited to 'pkgs/by-name/ta/tabby/package.nix')
-rw-r--r-- | pkgs/by-name/ta/tabby/package.nix | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/by-name/ta/tabby/package.nix b/pkgs/by-name/ta/tabby/package.nix index 4ebc77e741b1..df01b5c4940a 100644 --- a/pkgs/by-name/ta/tabby/package.nix +++ b/pkgs/by-name/ta/tabby/package.nix @@ -19,7 +19,7 @@ , rocmSupport ? config.rocmSupport , darwin -, metalSupport ? stdenv.isDarwin && stdenv.isAarch64 +, metalSupport ? stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 # one of [ null "cpu" "rocm" "cuda" "metal" ]; , acceleration ? null @@ -55,16 +55,16 @@ let # If user did not not override the acceleration attribute, then try to use one of # - nixpkgs.config.cudaSupport # - nixpkgs.config.rocmSupport - # - metal if (stdenv.isDarwin && stdenv.isAarch64) + # - metal if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) # !! warn if multiple acceleration methods are enabled and default to the first one in the list featureDevice = if (builtins.isNull acceleration) then (warnIfMultipleAccelerationMethods availableAccelerations) else acceleration; - warnIfNotLinux = api: (lib.warnIfNot stdenv.isLinux + warnIfNotLinux = api: (lib.warnIfNot stdenv.hostPlatform.isLinux "building tabby with `${api}` is only supported on linux; falling back to cpu" - stdenv.isLinux); - warnIfNotDarwinAarch64 = api: (lib.warnIfNot (stdenv.isDarwin && stdenv.isAarch64) + stdenv.hostPlatform.isLinux); + warnIfNotDarwinAarch64 = api: (lib.warnIfNot (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "building tabby with `${api}` is only supported on Darwin-aarch64; falling back to cpu" - (stdenv.isDarwin && stdenv.isAarch64)); + (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)); validAccel = lib.assertOneOf "tabby.featureDevice" featureDevice [ "cpu" "rocm" "cuda" "metal" ]; @@ -88,7 +88,7 @@ let # TODO(ghthor): some of this can be removed darwinBuildInputs = [ llamaccpPackage ] - ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ++ optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Foundation Accelerate CoreVideo @@ -143,7 +143,7 @@ rustPlatform.buildRustPackage { ]; buildInputs = [ openssl ] - ++ optionals stdenv.isDarwin darwinBuildInputs + ++ optionals stdenv.hostPlatform.isDarwin darwinBuildInputs ++ optionals enableCuda cudaBuildInputs ++ optionals enableRocm rocmBuildInputs ; @@ -164,6 +164,6 @@ rustPlatform.buildRustPackage { mainProgram = "tabby"; license = licenses.asl20; maintainers = [ maintainers.ghthor ]; - broken = stdenv.isDarwin && !stdenv.isAarch64; + broken = stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64; }; } |