about summary refs log tree commit diff
path: root/pkgs/development/tools/tabnine
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-10-01 10:45:58 -0700
committerJon <jonringer@users.noreply.github.com>2020-10-01 14:05:44 -0700
commite6ec27be9808ae6e661e500e9bc31f959ac449bc (patch)
tree94900cc54c75f0288a728a37c347221c57c45c47 /pkgs/development/tools/tabnine
parent1f87da9754c75c6170173e3483f6032f9df21431 (diff)
tabnine: fix build
Co-authored by: @onsails
Diffstat (limited to 'pkgs/development/tools/tabnine')
-rw-r--r--pkgs/development/tools/tabnine/default.nix24
1 files changed, 13 insertions, 11 deletions
diff --git a/pkgs/development/tools/tabnine/default.nix b/pkgs/development/tools/tabnine/default.nix
index 7ced6dbb00c56..6e49bd2aafc54 100644
--- a/pkgs/development/tools/tabnine/default.nix
+++ b/pkgs/development/tools/tabnine/default.nix
@@ -1,34 +1,36 @@
 { stdenv, lib, fetchurl }:
 
 let
-  target =
+  version = "3.1.1";
+  src =
     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
-      "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}";
 in stdenv.mkDerivation rec {
   pname = "tabnine";
-  version = "3.1.1";
 
-  src = fetchurl {
-    url = "https://update.tabnine.com/${version}/${target}/TabNine";
-    sha256 = "w+Ufy4pICfQmseKCeohEQIP0VD6YrkYTEn41HX40Zlw=";
-  };
+  inherit version src;
 
   dontBuild = true;
   dontUnpack = true;
 
   installPhase = ''
-    chmod +x $src
     mkdir -p $out/bin
     ln -s $src $out/bin/TabNine
   '';
 
-  meta = {
+  meta = with lib; {
     homepage = "https://tabnine.com";
     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" ];
   };
 }