depot/third_party/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
Default email bb584b27e9 Project import generated by Copybara.
GitOrigin-RevId: 5181d5945eda382ff6a9ca3e072ed6ea9b547fee
2022-04-15 03:41:22 +02:00

63 lines
2.3 KiB
Nix

{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
let
inherit (stdenv.hostPlatform) system;
plat = {
x86_64-linux = "linux-x64";
x86_64-darwin = "darwin";
aarch64-linux = "linux-arm64";
aarch64-darwin = "darwin-arm64";
armv7l-linux = "linux-armhf";
}.${system};
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "1si0r8nww5m3yn3vzw0pk3nykfvxnlwna4pp11bsli4vqj1ym2nz";
x86_64-darwin = "002rkvc8fa7r9x2dsjhkwzmc1sp5mq998frrw5xd6bym0cp4j76l";
aarch64-linux = "0w9gjk2a5z8cqlg43jn2r588asymiklm1b28l54gvqp7jawlb0fd";
aarch64-darwin = "18h2kk6fcdz38xzyn37brbbj4nbrjgzv9xsz7c7iai8d01vh7s33";
armv7l-linux = "16cs2ald40nh76m3fxxfd233hr687dhwbqdkvjz4s6xxwi0rhvwc";
}.${system};
in
callPackage ./generic.nix rec {
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.66.2";
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://update.code.visualstudio.com/${version}/${plat}/stable";
inherit sha256;
};
sourceRoot = "";
updateScript = ./update-vscode.sh;
meta = with lib; {
description = ''
Open source source code editor developed by Microsoft for Windows,
Linux and macOS
'';
mainProgram = "code";
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;
maintainers = with maintainers; [ eadwu synthetica maxeaubrey bobby285271 ];
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7l-linux" ];
};
}