mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 04:33:57 +00:00
7f8828230f
Download and extract the prebuilt arm64-darwin archive.
65 lines
2.3 KiB
Nix
65 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 = "06as63444m2036vk4180dfpavmp9l07qc1jfc4gg86j0apdxr6sh";
|
|
x86_64-darwin = "0dxchqwk3flv2cr542y1l7c06lak9zzj09f2kljsan6gs6zbls2b";
|
|
aarch64-linux = "0pdbganyc59mll3232b26cc6fi8a8kpvjm5qky4qr4pk4jsj2r6q";
|
|
aarch64-darwin = "00pax1hakj5l21j7fm1b05s8kkfnbvgfs9h7f27ad379n6482gxl";
|
|
armv7l-linux = "1g63xh3k1nm8kls674qavmyl7csb3m4d7ywc0512far76lw39rvr";
|
|
}.${system};
|
|
in
|
|
callPackage ./generic.nix rec {
|
|
# Please backport all compatible updates to the stable release.
|
|
# This is important for the extension ecosystem.
|
|
version = "1.58.0";
|
|
pname = "vscode";
|
|
|
|
sourceExecutableName = "code";
|
|
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-vscodium.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 ];
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7l-linux" ];
|
|
};
|
|
}
|