2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
2022-08-12 12:06:08 +00:00
|
|
|
throwSystem = throw "Unsupported system: ${system}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
2022-08-12 12:06:08 +00:00
|
|
|
}.${system} or throwSystem;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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-08-21 13:32:41 +00:00
|
|
|
x86_64-linux = "08p4l47zr4dm7mw65wwdsf6q1wkzkzg3l2y5zrs3ng3nafql96zs";
|
|
|
|
x86_64-darwin = "1pf8xpg2sb0iwfaixvzhmglqrrky2625b66fjwlc5zkj0dlff106";
|
|
|
|
aarch64-linux = "1c35s7zykcrqf3va1cv7hqf1dp3cl70kdvqv3vgflqldc1wcza9h";
|
|
|
|
aarch64-darwin = "1jpsf54x7yy53d6766gpw90ngdi6kicpqm1qbzbmmsasndl7rklp";
|
|
|
|
armv7l-linux = "10vj751bjdkzsdcrdpq6xb430pdhdbz8ysk835ir64i3mv6ygi7k";
|
2022-08-12 12:06:08 +00:00
|
|
|
}.${system} or throwSystem;
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
callPackage ./generic.nix rec {
|
|
|
|
# Please backport all compatible updates to the stable release.
|
|
|
|
# This is important for the extension ecosystem.
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "1.70.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
|
|
|
};
|
|
|
|
}
|