depot/third_party/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
Default email aa526eb20f Project import generated by Copybara.
GitOrigin-RevId: fcd48a5a0693f016a5c370460d0c2a8243b882dc
2022-03-10 11:12:11 -08: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 = "09hqcym8dj4d8r5ibdzypdmjxdw4ix24zq688vnb4kfas2jbb3hi";
x86_64-darwin = "1wij82gl1wqrprrfn9cfih19wr4h3bn2xapr1l2l0mkansrzsvg5";
aarch64-linux = "09x93i190lmxb3ygzjcmb7ag3dz7ixf07yk7zqc7ljrnn5f0b6ag";
aarch64-darwin = "1k7glnqy0vjx55chjpwbgwipcvzb0vx0wmvqis865pvzmr0d06a0";
armv7l-linux = "0vkivg1f61k8vkr0j9dm7fw2klh45xxnp07pill1gmrwxafm5bra";
}.${system};
in
callPackage ./generic.nix rec {
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.65.1";
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" ];
};
}