2019-06-16 19:59:06 +00:00
|
|
|
{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
|
2019-05-21 18:17:01 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
|
|
|
|
plat = {
|
2019-08-13 21:52:01 +00:00
|
|
|
x86_64-linux = "linux-x64";
|
|
|
|
x86_64-darwin = "darwin";
|
2020-12-16 16:40:14 +00:00
|
|
|
aarch64-linux = "linux-arm64";
|
|
|
|
armv7l-linux = "linux-armhf";
|
2019-05-21 18:17:01 +00:00
|
|
|
}.${system};
|
|
|
|
|
|
|
|
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
|
|
|
|
|
|
|
|
sha256 = {
|
2021-04-14 00:10:23 +00:00
|
|
|
x86_64-linux = "08151qdhf4chg9gfbs0dl0v0k5vla2gz5dfy439jzdg1d022d5rw";
|
|
|
|
x86_64-darwin = "1vlxxkv3wvds3xl3ir93l5q5yq2d7mcragsicfayj9x9r49ilqn3";
|
|
|
|
aarch64-linux = "0rxw1wsi555z41ak817sxqyyan0rm7hma640zsh8dz0yvhzdv1h8";
|
|
|
|
armv7l-linux = "1ijvd7r2fxxlw4zv3zx5h70b3d0b4gcq3aljsi02v1lr2zm8f8gb";
|
2019-05-21 18:17:01 +00:00
|
|
|
}.${system};
|
|
|
|
in
|
|
|
|
callPackage ./generic.nix rec {
|
2020-01-06 10:42:04 +00:00
|
|
|
# The update script doesn't correctly change the hash for darwin, so please:
|
|
|
|
# nixpkgs-update: no auto update
|
2019-05-21 18:17:01 +00:00
|
|
|
|
2020-04-01 04:36:58 +00:00
|
|
|
# Please backport all compatible updates to the stable release.
|
|
|
|
# This is important for the extension ecosystem.
|
2021-04-14 00:10:23 +00:00
|
|
|
version = "1.55.2";
|
2019-05-21 18:17:01 +00:00
|
|
|
pname = "vscode";
|
|
|
|
|
|
|
|
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
|
|
|
longName = "Visual Studio Code" + lib.optionalString isInsiders " - Insiders";
|
|
|
|
shortName = "Code" + lib.optionalString isInsiders " - Insiders";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "VSCode_${version}_${plat}.${archive_fmt}";
|
2021-03-24 14:24:12 +00:00
|
|
|
url = "https://update.code.visualstudio.com/${version}/${plat}/stable";
|
2019-05-21 18:17:01 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-05-21 18:17:01 +00:00
|
|
|
description = ''
|
|
|
|
Open source source code editor developed by Microsoft for Windows,
|
|
|
|
Linux and macOS
|
|
|
|
'';
|
|
|
|
longDescription = ''
|
|
|
|
Open source source code editor developed by Microsoft for Windows,
|
|
|
|
Linux and macOS. It includes support for debugging, embedded Git
|
|
|
|
control, syntax highlighting, intelligent code completion, snippets,
|
|
|
|
and code refactoring. It is also customizable, so users can change the
|
|
|
|
editor's theme, keyboard shortcuts, and preferences
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://code.visualstudio.com/";
|
|
|
|
downloadPage = "https://code.visualstudio.com/Updates";
|
2019-05-21 18:17:01 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ eadwu synthetica ];
|
2020-12-16 16:40:14 +00:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "armv7l-linux" ];
|
2019-05-21 18:17:01 +00:00
|
|
|
};
|
|
|
|
}
|