nixpkgs-suyu/pkgs/applications/editors/vscode/vscode.nix

65 lines
2.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
2019-05-21 20:17:01 +02:00
let
inherit (stdenv.hostPlatform) system;
plat = {
2019-08-13 23:52:01 +02:00
x86_64-linux = "linux-x64";
x86_64-darwin = "darwin";
aarch64-linux = "linux-arm64";
aarch64-darwin = "darwin-arm64";
armv7l-linux = "linux-armhf";
2019-05-21 20:17:01 +02:00
}.${system};
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
2019-05-21 20:17:01 +02:00
sha256 = {
2021-07-17 02:29:19 +02:00
x86_64-linux = "049spg4c1arkw97mg0h046kiirmcrjj97sy4ldiblwldjn510acw";
x86_64-darwin = "0g6b1891ag4a6p7rlkfka5v4nbmpr4ckkmibhw8l3wa9zdzs77x6";
aarch64-linux = "1qvk6cn5v9bz4vl5ifpdgrba94v6a54xx8s3fxdkj3lqvq27kpd1";
aarch64-darwin = "1whgjkxy70ifx1vaddxr8f1xcg651fhca4x7rzidzbyyf3baghy0";
armv7l-linux = "1k45s81s4ispc0vz7i17a7gss05d82vpymxgangg6f1yxwz944r4";
2019-05-21 20:17:01 +02:00
}.${system};
in
callPackage ./generic.nix rec {
2020-04-01 06:36:58 +02:00
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
2021-07-17 02:29:19 +02:00
version = "1.58.2";
2019-05-21 20:17:01 +02:00
pname = "vscode";
sourceExecutableName = "code";
2019-05-21 20:17:01 +02:00
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}";
2021-03-24 15:24:12 +01:00
url = "https://update.code.visualstudio.com/${version}/${plat}/stable";
2019-05-21 20:17:01 +02:00
inherit sha256;
};
sourceRoot = "";
updateScript = ./update-vscodium.sh;
meta = with lib; {
2019-05-21 20:17:01 +02:00
description = ''
Open source source code editor developed by Microsoft for Windows,
Linux and macOS
'';
mainProgram = "code";
2019-05-21 20:17:01 +02:00
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";
2019-05-21 20:17:01 +02:00
license = licenses.unfree;
2021-07-18 21:23:26 +02:00
maintainers = with maintainers; [ eadwu synthetica maxeaubrey ];
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7l-linux" ];
2019-05-21 20:17:01 +02:00
};
}