@@ -1,17 +1,17 @@
1−{ stdenv, lib, fetchurl }:
1+{ stdenv, lib, fetchurl, unzip }:
22
33let
4− version = "3.1.1";
4+ version = "3.2.63";
55 src =
66 if stdenv.hostPlatform.system == "x86_64-darwin" then
77 fetchurl {
8− url = "https://update.tabnine.com/${version}/x86_64-apple-darwin/TabNine";
9− sha256 = "w+Ufy4pICfQmseKCeohEQIP0VD6YrkYTEn41HX40Zlw=";
8+ url = "https://update.tabnine.com/bundles/${version}/x86_64-apple-darwin/TabNine.zip";
9+ sha256 = "0y0wb3jdr2qk4k21c11w8c9a5fl0h2rm1wm7m8hqdywy4lz9ppgy";
1010 }
1111 else if stdenv.hostPlatform.system == "x86_64-linux" then
1212 fetchurl {
13− url = "https://update.tabnine.com/${version}/x86_64-unknown-linux-musl/TabNine";
14− sha256 = "hSltZWQz2BRFut0NDI4fS/N8XxFJaYGHRtV3llBVOY4=";
13+ url = "https://update.tabnine.com/bundles/${version}/x86_64-unknown-linux-musl/TabNine.zip";
14+ sha256 = "0zzk2w5azk5f0svjxlj2774x01xdflb767xxvbglj4223dgyx2x5";
1515 }
1616 else throw "Not supported on ${stdenv.hostPlatform.system}";
1717in stdenv.mkDerivation rec {
@@ -20,10 +20,15 @@ in stdenv.mkDerivation rec {
2020 inherit version src;
2121
2222 dontBuild = true;
23− dontUnpack = true;
23+
24+ # Work around the "unpacker appears to have produced no directories"
25+ # case that happens when the archive doesn't have a subdirectory.
26+ setSourceRoot = "sourceRoot=`pwd`";
27+
28+ nativeBuildInputs = [ unzip ];
2429
2530 installPhase = ''
26− install -Dm755 $src $out/bin/TabNine
31+ install -Dm755 TabNine $out/bin/TabNine
2732 '';
2833
2934 meta = with lib; {