mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
tabnine: expose binary platform in passthru
This commit is contained in:
parent
196138ea6b
commit
b5de556b34
@ -1,27 +1,23 @@
|
||||
{ stdenv, lib, fetchurl, unzip }:
|
||||
|
||||
let
|
||||
# You can check the latest version with `curl -sS https://update.tabnine.com/bundles/version`
|
||||
version = "3.5.37";
|
||||
src =
|
||||
if stdenv.hostPlatform.system == "x86_64-darwin" then
|
||||
fetchurl
|
||||
{
|
||||
url = "https://update.tabnine.com/bundles/${version}/x86_64-apple-darwin/TabNine.zip";
|
||||
sha256 = "sha256-Vxmhl4/bhRDeByGgkdSF8yEY5wI23WzT2iH1OFkEpck=";
|
||||
}
|
||||
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
fetchurl
|
||||
{
|
||||
url = "https://update.tabnine.com/bundles/${version}/x86_64-unknown-linux-musl/TabNine.zip";
|
||||
sha256 = "sha256-pttjlx7WWE3nog9L1APp8HN+a4ShhlBj5irHOaPgqHw=";
|
||||
}
|
||||
else throw "Not supported on ${stdenv.hostPlatform.system}";
|
||||
platform =
|
||||
if stdenv.hostPlatform.system == "x86_64-linux" then {
|
||||
name = "x86_64-unknown-linux-musl";
|
||||
sha256 = "sha256-pttjlx7WWE3nog9L1APp8HN+a4ShhlBj5irHOaPgqHw=";
|
||||
} else if stdenv.hostPlatform.system == "x86_64-darwin" then {
|
||||
name = "x86_64-apple-darwin";
|
||||
sha256 = "sha256-Vxmhl4/bhRDeByGgkdSF8yEY5wI23WzT2iH1OFkEpck=";
|
||||
} 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.5.37";
|
||||
|
||||
inherit version src;
|
||||
src = fetchurl {
|
||||
url = "https://update.tabnine.com/bundles/${version}/${platform.name}/TabNine.zip";
|
||||
inherit (platform) sha256;
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
@ -40,6 +36,8 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.platform = platform.name;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://tabnine.com";
|
||||
description = "Smart Compose for code that uses deep learning to help you write code faster";
|
||||
|
Loading…
Reference in New Issue
Block a user