1 { stdenv, lib, fetchurl, unzip }:
3 sources = lib.importJSON ./sources.json;
5 if (builtins.hasAttr stdenv.hostPlatform.system sources.platforms) then
6 builtins.getAttr (stdenv.hostPlatform.system) sources.platforms
8 throw "Not supported on ${stdenv.hostPlatform.system}";
12 inherit (sources) version;
15 url = "https://update.tabnine.com/bundles/${sources.version}/${platform.name}/TabNine.zip";
16 inherit (platform) hash;
21 # Work around the "unpacker appears to have produced no directories"
22 # case that happens when the archive doesn't have a subdirectory.
25 nativeBuildInputs = [ unzip ];
29 install -Dm755 TabNine $out/bin/TabNine
30 install -Dm755 TabNine-deep-cloud $out/bin/TabNine-deep-cloud
31 install -Dm755 TabNine-deep-local $out/bin/TabNine-deep-local
32 install -Dm755 WD-TabNine $out/bin/WD-TabNine
37 platform = platform.name;
38 updateScript = ./update.sh;
42 homepage = "https://tabnine.com";
43 description = "Smart Compose for code that uses deep learning to help you write code faster";
44 license = licenses.unfree;
45 platforms = attrNames sources.platforms;
46 maintainers = with maintainers; [ lovesegfault ];