forked from mirrors/nixpkgs
63 lines
2.3 KiB
Nix
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";
|
|
armv7l-linux = "linux-armhf";
|
|
}.${system};
|
|
|
|
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
|
|
|
|
sha256 = {
|
|
x86_64-linux = "0v1g7j5q2j86c3r7jib8xs1sf2h3xvwv1s0xsqbig480fchlshjg";
|
|
x86_64-darwin = "109529acrvyassq00mbhnwbxq7rfq9n69rgcw4n0rysgp8n58386";
|
|
aarch64-linux = "0p6pz9apbfmr4pf7fikp2rmvk5gr87md1zrhr6hhd1qwgpc9kl07";
|
|
armv7l-linux = "1qrp75nbzgqp7mv42m6wbj000l33rhfv7cnxdv6lp6cy05381aq6";
|
|
}.${system};
|
|
in
|
|
callPackage ./generic.nix rec {
|
|
# The update script doesn't correctly change the hash for darwin, so please:
|
|
# nixpkgs-update: no auto update
|
|
|
|
# Please backport all compatible updates to the stable release.
|
|
# This is important for the extension ecosystem.
|
|
version = "1.56.0";
|
|
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 = "";
|
|
|
|
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 ];
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "armv7l-linux" ];
|
|
};
|
|
}
|