tabnine: fix build
Co-authored by: @onsails
This commit is contained in:
parent
1f87da9754
commit
e6ec27be98
@ -1,34 +1,36 @@
|
|||||||
{ stdenv, lib, fetchurl }:
|
{ stdenv, lib, fetchurl }:
|
||||||
|
|
||||||
let
|
let
|
||||||
target =
|
version = "3.1.1";
|
||||||
|
src =
|
||||||
if stdenv.hostPlatform.system == "x86_64-darwin" then
|
if stdenv.hostPlatform.system == "x86_64-darwin" then
|
||||||
"x86_64-apple-darwin"
|
fetchurl {
|
||||||
|
url = "https://update.tabnine.com/${version}/x86_64-apple-darwin/TabNine";
|
||||||
|
sha256 = "w+Ufy4pICfQmseKCeohEQIP0VD6YrkYTEn41HX40Zlw=";
|
||||||
|
}
|
||||||
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||||
"x86_64-unknown-linux-musl"
|
fetchurl {
|
||||||
|
url = "https://update.tabnine.com/${version}/x86_64-unknown-linux-musl/TabNine";
|
||||||
|
sha256 = "hSltZWQz2BRFut0NDI4fS/N8XxFJaYGHRtV3llBVOY4=";
|
||||||
|
}
|
||||||
else throw "Not supported on ${stdenv.hostPlatform.system}";
|
else throw "Not supported on ${stdenv.hostPlatform.system}";
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "tabnine";
|
pname = "tabnine";
|
||||||
version = "3.1.1";
|
|
||||||
|
|
||||||
src = fetchurl {
|
inherit version src;
|
||||||
url = "https://update.tabnine.com/${version}/${target}/TabNine";
|
|
||||||
sha256 = "w+Ufy4pICfQmseKCeohEQIP0VD6YrkYTEn41HX40Zlw=";
|
|
||||||
};
|
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
chmod +x $src
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
ln -s $src $out/bin/TabNine
|
ln -s $src $out/bin/TabNine
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
homepage = "https://tabnine.com";
|
homepage = "https://tabnine.com";
|
||||||
description = "Smart Compose for code that uses deep learning to help you write code faster";
|
description = "Smart Compose for code that uses deep learning to help you write code faster";
|
||||||
license = lib.licenses.unfree;
|
license = licenses.unfree;
|
||||||
platforms = [ "x86_64-darwin" "x86_64-linux" ];
|
platforms = [ "x86_64-darwin" "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user