2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
|
|
|
|
plat = {
|
|
|
|
x86_64-linux = "linux-x64";
|
|
|
|
x86_64-darwin = "darwin";
|
2020-12-29 15:07:52 +00:00
|
|
|
aarch64-linux = "linux-arm64";
|
2021-07-14 22:03:04 +00:00
|
|
|
aarch64-darwin = "darwin-arm64";
|
2020-12-29 15:07:52 +00:00
|
|
|
armv7l-linux = "linux-armhf";
|
2020-04-24 23:36:52 +00:00
|
|
|
}.${system};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
sha256 = {
|
2022-02-20 05:27:41 +00:00
|
|
|
x86_64-linux = "0gv71l9cidkbbv7b1dsfyn7lnlwcmjds9qx6nrh7alymdm1xa2xr";
|
|
|
|
x86_64-darwin = "1is795040xb3l23crblwf056wsvsi4dip3lkwhlblhkpsl0048f1";
|
|
|
|
aarch64-linux = "186dy6h3krc6fqvmh1nay1dk5109kl9p25kx37jkbzf2qhnpibm8";
|
|
|
|
aarch64-darwin = "04xc5fy4wcplfrigbm624dpzxd2m4rkq979xr1i57p3d20i96s6g";
|
|
|
|
armv7l-linux = "1k7bfmrfw16zpn33p7ycxpp6g9xh8aypmf61nrkx2jn99nxy5d3s";
|
2020-04-24 23:36:52 +00:00
|
|
|
}.${system};
|
|
|
|
in
|
|
|
|
callPackage ./generic.nix rec {
|
|
|
|
# Please backport all compatible updates to the stable release.
|
|
|
|
# This is important for the extension ecosystem.
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "1.64.2";
|
2020-04-24 23:36:52 +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-20 04:20:00 +00:00
|
|
|
url = "https://update.code.visualstudio.com/${version}/${plat}/stable";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "";
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
updateScript = ./update-vscode.sh;
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = ''
|
|
|
|
Open source source code editor developed by Microsoft for Windows,
|
|
|
|
Linux and macOS
|
|
|
|
'';
|
2021-05-03 20:48:10 +00:00
|
|
|
mainProgram = "code";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
homepage = "https://code.visualstudio.com/";
|
|
|
|
downloadPage = "https://code.visualstudio.com/Updates";
|
|
|
|
license = licenses.unfree;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ eadwu synthetica maxeaubrey bobby285271 ];
|
2021-07-14 22:03:04 +00:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7l-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|