diff --git a/pkgs/development/tools/tabnine/default.nix b/pkgs/development/tools/tabnine/default.nix new file mode 100644 index 000000000000..7ced6dbb00c5 --- /dev/null +++ b/pkgs/development/tools/tabnine/default.nix @@ -0,0 +1,34 @@ +{ stdenv, lib, fetchurl }: + +let + target = + if stdenv.hostPlatform.system == "x86_64-darwin" then + "x86_64-apple-darwin" + else if stdenv.hostPlatform.system == "x86_64-linux" then + "x86_64-unknown-linux-musl" + else throw "Not supported on ${stdenv.hostPlatform.system}"; +in stdenv.mkDerivation rec { + pname = "tabnine"; + version = "3.1.1"; + + src = fetchurl { + url = "https://update.tabnine.com/${version}/${target}/TabNine"; + sha256 = "w+Ufy4pICfQmseKCeohEQIP0VD6YrkYTEn41HX40Zlw="; + }; + + dontBuild = true; + dontUnpack = true; + + installPhase = '' + chmod +x $src + mkdir -p $out/bin + ln -s $src $out/bin/TabNine + ''; + + meta = { + homepage = "https://tabnine.com"; + description = "Smart Compose for code that uses deep learning to help you write code faster"; + license = lib.licenses.unfree; + platforms = [ "x86_64-darwin" "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f3b4ebdcb940..51b344f622b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7279,6 +7279,8 @@ in t = callPackage ../tools/misc/t { }; + tabnine = callPackage ../development/tools/tabnine { }; + t1utils = callPackage ../tools/misc/t1utils { }; talkfilters = callPackage ../misc/talkfilters {};