2020-10-01 13:58:15 +01:00
|
|
|
{ stdenv, lib, fetchurl }:
|
|
|
|
|
|
|
|
let
|
2020-10-01 18:45:58 +01:00
|
|
|
version = "3.1.1";
|
|
|
|
src =
|
2020-10-01 13:58:15 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-darwin" then
|
2020-10-01 18:45:58 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "https://update.tabnine.com/${version}/x86_64-apple-darwin/TabNine";
|
|
|
|
sha256 = "w+Ufy4pICfQmseKCeohEQIP0VD6YrkYTEn41HX40Zlw=";
|
|
|
|
}
|
2020-10-01 13:58:15 +01:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
2020-10-01 18:45:58 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "https://update.tabnine.com/${version}/x86_64-unknown-linux-musl/TabNine";
|
|
|
|
sha256 = "hSltZWQz2BRFut0NDI4fS/N8XxFJaYGHRtV3llBVOY4=";
|
|
|
|
}
|
2020-10-01 13:58:15 +01:00
|
|
|
else throw "Not supported on ${stdenv.hostPlatform.system}";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "tabnine";
|
|
|
|
|
2020-10-01 18:45:58 +01:00
|
|
|
inherit version src;
|
2020-10-01 13:58:15 +01:00
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $src $out/bin/TabNine
|
|
|
|
'';
|
|
|
|
|
2020-10-01 18:45:58 +01:00
|
|
|
meta = with lib; {
|
2020-10-01 13:58:15 +01:00
|
|
|
homepage = "https://tabnine.com";
|
|
|
|
description = "Smart Compose for code that uses deep learning to help you write code faster";
|
2020-10-01 18:45:58 +01:00
|
|
|
license = licenses.unfree;
|
2020-10-01 13:58:15 +01:00
|
|
|
platforms = [ "x86_64-darwin" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|