2019-06-16 22:59:06 +03:00
|
|
|
{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
|
2019-05-21 21:17:01 +03:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
2022-07-27 01:02:37 +03:00
|
|
|
throwSystem = throw "Unsupported system: ${system}";
|
2019-05-21 21:17:01 +03:00
|
|
|
|
|
|
|
plat = {
|
2019-08-14 00:52:01 +03:00
|
|
|
x86_64-linux = "linux-x64";
|
|
|
|
x86_64-darwin = "darwin";
|
2020-12-16 19:40:14 +03:00
|
|
|
aarch64-linux = "linux-arm64";
|
2021-07-11 23:51:17 +03:00
|
|
|
aarch64-darwin = "darwin-arm64";
|
2020-12-16 19:40:14 +03:00
|
|
|
armv7l-linux = "linux-armhf";
|
2022-07-27 01:02:37 +03:00
|
|
|
}.${system} or throwSystem;
|
2019-05-21 21:17:01 +03:00
|
|
|
|
2021-07-11 23:51:17 +03:00
|
|
|
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
|
2019-05-21 21:17:01 +03:00
|
|
|
|
|
|
|
sha256 = {
|
2022-09-02 03:49:39 +03:00
|
|
|
x86_64-linux = "0cnrbjqcnkv7ybj9j7l0lcnfnxq18mddhdkj9797928q643bmj6z";
|
|
|
|
x86_64-darwin = "1d9gb3i2k0c9cn38igg1nm91bfqdi4xg29zlprqsqh98ijwqy25y";
|
|
|
|
aarch64-linux = "1jm8ll8f4m99ly53rv7000ng9a0l8jn4xpc6kfhmqdnf0jqfncsh";
|
|
|
|
aarch64-darwin = "1awmaxkr5nl513c50g6k4r2j3w8p2by1j9i3kw7vkmwn91bk24i4";
|
|
|
|
armv7l-linux = "1d2hl9jy1kfkzn4j7qkp3k8j1qc3r9rpqhvkfrr2axcqrahcrfsd";
|
2022-07-27 01:02:37 +03:00
|
|
|
}.${system} or throwSystem;
|
2019-05-21 21:17:01 +03:00
|
|
|
in
|
|
|
|
callPackage ./generic.nix rec {
|
2020-04-01 07:36:58 +03:00
|
|
|
# Please backport all compatible updates to the stable release.
|
|
|
|
# This is important for the extension ecosystem.
|
2022-09-02 03:49:39 +03:00
|
|
|
version = "1.71.0";
|
2019-05-21 21:17:01 +03: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 17:24:12 +03:00
|
|
|
url = "https://update.code.visualstudio.com/${version}/${plat}/stable";
|
2019-05-21 21:17:01 +03:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "";
|
|
|
|
|
2021-08-19 13:30:37 +03:00
|
|
|
updateScript = ./update-vscode.sh;
|
2021-05-24 22:46:44 +03:00
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2019-05-21 21:17:01 +03:00
|
|
|
description = ''
|
|
|
|
Open source source code editor developed by Microsoft for Windows,
|
|
|
|
Linux and macOS
|
|
|
|
'';
|
2021-04-27 17:03:07 +03:00
|
|
|
mainProgram = "code";
|
2019-05-21 21:17:01 +03: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
|
|
|
|
'';
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://code.visualstudio.com/";
|
|
|
|
downloadPage = "https://code.visualstudio.com/Updates";
|
2019-05-21 21:17:01 +03:00
|
|
|
license = licenses.unfree;
|
2021-11-19 16:01:01 +03:00
|
|
|
maintainers = with maintainers; [ eadwu synthetica maxeaubrey bobby285271 ];
|
2021-07-11 23:51:17 +03:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7l-linux" ];
|
2019-05-21 21:17:01 +03:00
|
|
|
};
|
|
|
|
}
|