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-03-05 16:20:37 +00:00
|
|
|
x86_64-linux = "04lyih67vcf2hficvlv1r25k8k48n9x15sbqrfp1syzhy5i4zch3";
|
|
|
|
x86_64-darwin = "0460mh1ah9hswn8ihais5hzvz453r36ay2bb3hy3z1grfs3s5blk";
|
|
|
|
aarch64-linux = "1db2r4ja0srya2lw900l4mk24xva00kf7vxajcb7q0rab4cpfr3n";
|
|
|
|
aarch64-darwin = "04c43ibbarsqdm1wcsmsi9rnfsl3lyq638d3j0dj94xifk0v61j9";
|
|
|
|
armv7l-linux = "1qzi2biy5mjbxdgcakzmid68ykq6vrgj4lqmz0jk3g46r4kpnrgd";
|
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-03-05 16:20:37 +00:00
|
|
|
version = "1.65.0";
|
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
|
|
|
};
|
|
|
|
}
|