git.iko.soy/typeable/nixpkgs
on master help sign in
tabnine: fix build

Co-authored by: @onsails

commite6ec27be9808ae6e661e500e9bc31f959ac449bc authorJonathan Ringer <jonringer117@gmail.com> dateThu 1 Oct 2020, 10:45 (6 years ago) parent1f87da9
1 file changed+13−11
pkgs/development/tools/tabnine/default.nix+13−11
pkgs/development/tools/tabnine/default.nix+13−11
@@ -1,34 +1,36 @@
11{ stdenv, lib, fetchurl }:
22
33let
4− target =
4+ version = "3.1.1";
5+ src =
56 if stdenv.hostPlatform.system == "x86_64-darwin" then
6− "x86_64-apple-darwin"
7+ fetchurl {
8+ url = "https://update.tabnine.com/${version}/x86_64-apple-darwin/TabNine";
9+ sha256 = "w+Ufy4pICfQmseKCeohEQIP0VD6YrkYTEn41HX40Zlw=";
10+ }
711 else if stdenv.hostPlatform.system == "x86_64-linux" then
8− "x86_64-unknown-linux-musl"
12+ fetchurl {
13+ url = "https://update.tabnine.com/${version}/x86_64-unknown-linux-musl/TabNine";
14+ sha256 = "hSltZWQz2BRFut0NDI4fS/N8XxFJaYGHRtV3llBVOY4=";
15+ }
916 else throw "Not supported on ${stdenv.hostPlatform.system}";
1017in stdenv.mkDerivation rec {
1118 pname = "tabnine";
12− version = "3.1.1";
1319
14− src = fetchurl {
15− url = "https://update.tabnine.com/${version}/${target}/TabNine";
16− sha256 = "w+Ufy4pICfQmseKCeohEQIP0VD6YrkYTEn41HX40Zlw=";
17− };
20+ inherit version src;
1821
1922 dontBuild = true;
2023 dontUnpack = true;
2124
2225 installPhase = ''
23− chmod +x $src
2426 mkdir -p $out/bin
2527 ln -s $src $out/bin/TabNine
2628 '';
2729
28− meta = {
30+ meta = with lib; {
2931 homepage = "https://tabnine.com";
3032 description = "Smart Compose for code that uses deep learning to help you write code faster";
31− license = lib.licenses.unfree;
33+ license = licenses.unfree;
3234 platforms = [ "x86_64-darwin" "x86_64-linux" ];
3335 };
3436}