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