mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +00:00
Merge pull request #141884 from onsails/tabnine
tabnine: support aarch64-darwin
This commit is contained in:
commit
1d6e94d02f
@ -1,18 +1,29 @@
|
||||
{ stdenv, lib, fetchurl, unzip }:
|
||||
let
|
||||
platform =
|
||||
if stdenv.hostPlatform.system == "x86_64-linux" then {
|
||||
supportedPlatforms = {
|
||||
"x86_64-linux" = {
|
||||
name = "x86_64-unknown-linux-musl";
|
||||
sha256 = "sha256-+jxjHE2/6IGptMlKXGebHcaIVokOP76ut325EbkdaA0=";
|
||||
} else if stdenv.hostPlatform.system == "x86_64-darwin" then {
|
||||
sha256 = "sha256-On+Sokm2+BV3JbIwK8oPO6882FOWBlgSaAp3VAyR+RM=";
|
||||
};
|
||||
"x86_64-darwin" = {
|
||||
name = "x86_64-apple-darwin";
|
||||
sha256 = "sha256-87Hy1akNrZWQbKutkv4CToTyMcxRc7Y24o1+vI4pev8=";
|
||||
} else throw "Not supported on ${stdenv.hostPlatform.system}";
|
||||
sha256 = "sha256-4YCm42mVcsEvY4I5MWrnbfgUIU7KUIrEirvjN8ISIr0=";
|
||||
};
|
||||
"aarch64-darwin" = {
|
||||
name = "aarch64-apple-darwin";
|
||||
sha256 = "sha256-HN4o5bGX389eAR7ea5EY1JlId8q4lSPGJ4cZo9c2aP4=";
|
||||
};
|
||||
};
|
||||
platform =
|
||||
if (builtins.hasAttr stdenv.hostPlatform.system supportedPlatforms) then
|
||||
builtins.getAttr (stdenv.hostPlatform.system) supportedPlatforms
|
||||
else
|
||||
throw "Not supported on ${stdenv.hostPlatform.system}";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tabnine";
|
||||
# You can check the latest version with `curl -sS https://update.tabnine.com/bundles/version`
|
||||
version = "3.6.8";
|
||||
version = "3.7.25";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://update.tabnine.com/bundles/${version}/${platform.name}/TabNine.zip";
|
||||
@ -42,7 +53,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://tabnine.com";
|
||||
description = "Smart Compose for code that uses deep learning to help you write code faster";
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-darwin" "x86_64-linux" ];
|
||||
platforms = [ "x86_64-darwin" "aarch64-darwin" "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ lovesegfault ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user