8 sources = lib.importJSON ./sources.json;
10 if (builtins.hasAttr stdenv.hostPlatform.system sources.platforms) then
11 builtins.getAttr (stdenv.hostPlatform.system) sources.platforms
13 throw "Not supported on ${stdenv.hostPlatform.system}";
17 inherit (sources) version;
20 url = "https://update.tabnine.com/bundles/${sources.version}/${platform.name}/TabNine.zip";
21 inherit (platform) hash;
26 # Work around the "unpacker appears to have produced no directories"
27 # case that happens when the archive doesn't have a subdirectory.
30 nativeBuildInputs = [ unzip ];
34 install -Dm755 TabNine $out/bin/TabNine
35 install -Dm755 TabNine-deep-cloud $out/bin/TabNine-deep-cloud
36 install -Dm755 TabNine-deep-local $out/bin/TabNine-deep-local
37 install -Dm755 WD-TabNine $out/bin/WD-TabNine
42 platform = platform.name;
43 updateScript = ./update.sh;
47 homepage = "https://tabnine.com";
48 description = "Smart Compose for code that uses deep learning to help you write code faster";
49 license = licenses.unfree;
50 platforms = attrNames sources.platforms;
51 maintainers = with maintainers; [ lovesegfault ];