mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
64 lines
2.3 KiB
Nix
64 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 = "10iai5k0hvyvishp4gbamvsn9ff8dfm6kvql08h3plr8zrvmaian";
|
|
x86_64-darwin = "1cspla4cxw0l5cg44qywv3jgwyk2g7sx5lk1s4xhbrqz76knzcr7";
|
|
aarch64-linux = "1dc4gfaxlrsd637d8w2c5h4l8c96phv14pmkhmyc1jp1a0q6d5ja";
|
|
aarch64-darwin = "06d8ng6k62mh1qhba0c6nj2lag4vi7i50d2sx3nk8r2v8azwyrmk";
|
|
armv7l-linux = "030c8az831n73w35xfbjpympwvfprf1h4lxy8j5sysm4fbpzi03m";
|
|
}.${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.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 ];
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7l-linux" ];
|
|
};
|
|
}
|