2019-06-16 21:59:06 +02:00
|
|
|
{ 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";
|
2019-05-21 20:17:01 +02:00
|
|
|
}.${system};
|
|
|
|
|
|
|
|
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
|
|
|
|
|
|
|
|
sha256 = {
|
2020-03-10 12:51:22 +01:00
|
|
|
x86_64-linux = "0i8dmh9w7xgzfjii4m116lavydpfpcp7fxs4bcykf0a779pzwv87";
|
|
|
|
x86_64-darwin = "0z0r0dmmzk3k095g7jbrrk9gl1jpb3cai973xrjw17ank1lddcjf";
|
2019-05-21 20:17:01 +02:00
|
|
|
}.${system};
|
|
|
|
in
|
|
|
|
callPackage ./generic.nix rec {
|
2020-01-06 11:42:04 +01:00
|
|
|
# The update script doesn't correctly change the hash for darwin, so please:
|
|
|
|
# nixpkgs-update: no auto update
|
2019-05-21 20:17:01 +02:00
|
|
|
|
2020-03-10 12:51:22 +01:00
|
|
|
version = "1.43.0";
|
2019-05-21 20:17:01 +02:00
|
|
|
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://vscode-update.azurewebsites.net/${version}/${plat}/stable";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = ''
|
|
|
|
Open source source code editor developed by Microsoft for Windows,
|
|
|
|
Linux and macOS
|
|
|
|
'';
|
|
|
|
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 ];
|
2019-07-04 18:38:45 +02:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
2019-05-21 20:17:01 +02:00
|
|
|
};
|
|
|
|
}
|