depot/third_party/nixpkgs/pkgs/applications/editors/vscode/vscode.nix
Default email 8d28093ffb Project import generated by Copybara.
GitOrigin-RevId: 31ffc50c571e6683e9ecc9dbcbd4a8e9914b4497
2021-09-26 14:46:18 +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 = "0ma8pysww4r3p73rf94wddxk2ar091yw8mk1gi9jawiqvb9ksx0m";
x86_64-darwin = "008v7hxv71bvfp52wfx3sg97s54bn2klvy5xfjh48wcaka10vsj0";
aarch64-linux = "1wi5bmjdjfy1la3lwb3c389cjbn4q12j1214vna9214d8if37dyv";
aarch64-darwin = "14v0gq4kj0lxa6pwi7nbdpw0l25yfcqydigfzhmwrp8ipbnma62k";
armv7l-linux = "0h94gzwxknlvfy9gcd0zq4qsjmr9zr22adbfrqm1gvv1aksmgm4b";
}.${system};
in
callPackage ./generic.nix rec {
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.60.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 ];
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7l-linux" ];
};
}