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;
|
|
|
|
|
|
|
|
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";
|
|
|
|
armv7l-linux = "linux-armhf";
|
2019-05-21 21:17:01 +03:00
|
|
|
}.${system};
|
|
|
|
|
|
|
|
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
|
|
|
|
|
|
|
|
sha256 = {
|
2021-03-12 03:19:52 +03:00
|
|
|
x86_64-linux = "1px6x99cv8nb8lcy3vgcicr4ar0bfj5rfnc5a1yw8rs5p1qnflgw";
|
|
|
|
x86_64-darwin = "0grzivqb2fyvwh0fjh9vr205fjcsrd1iqhkwk3mgv792zfrb7ksf";
|
|
|
|
aarch64-linux = "0p0msxgc13kqmpq7wk61igc1qbgmgg9463s44dp4ii3630iyr4lw";
|
|
|
|
armv7l-linux = "147lki1wr5nzsg1mq12jmdjq9qr6vbdpmzbpr5nrvq23cak94ff8";
|
2019-05-21 21:17:01 +03:00
|
|
|
}.${system};
|
|
|
|
in
|
|
|
|
callPackage ./generic.nix rec {
|
2020-01-06 13:42:04 +03:00
|
|
|
# The update script doesn't correctly change the hash for darwin, so please:
|
|
|
|
# nixpkgs-update: no auto update
|
2019-05-21 21:17:01 +03:00
|
|
|
|
2020-04-01 07:36:58 +03:00
|
|
|
# Please backport all compatible updates to the stable release.
|
|
|
|
# This is important for the extension ecosystem.
|
2021-03-12 03:19:52 +03:00
|
|
|
version = "1.54.2";
|
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}";
|
|
|
|
url = "https://vscode-update.azurewebsites.net/${version}/${plat}/stable";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "";
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ eadwu synthetica ];
|
2020-12-16 19:40:14 +03:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "armv7l-linux" ];
|
2019-05-21 21:17:01 +03:00
|
|
|
};
|
|
|
|
}
|