Bump vscode from 1.52.1 to 1.53.2

This commit is contained in:
Dave Gallant
2021-02-14 21:32:42 -05:00
parent 892624ca08
commit 59519ec621
5 changed files with 11 additions and 65 deletions

6
flake.lock generated
View File

@@ -38,11 +38,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1612996220,
"narHash": "sha256-l2kzWXxL3vXr8VxUzRtORPJS0nFQ3E5kBPF/AYAK0wI=",
"lastModified": 1613226215,
"narHash": "sha256-3rA5cGIrBHD6yeKhNhsF7/t461ww25oJY8KyBb0IhjU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "758b29b5a28b818e311ad540637a5c1e40867489",
"rev": "ff96a0fa5635770390b184ae74debea75c3fd534",
"type": "github"
},
"original": {

View File

@@ -154,7 +154,7 @@
github-cli
glibcLocales
go-jira
hadolint
# hadolint
imagemagick
pfetch
pinentry-curses

View File

@@ -3,28 +3,15 @@
let
inherit (stdenv.hostPlatform) system;
plat = {
x86_64-linux = "linux-x64";
x86_64-darwin = "darwin";
aarch64-linux = "linux-arm64";
armv7l-linux = "linux-armhf";
}.${system};
plat = { x86_64-linux = "linux-x64"; }.${system};
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
archive_fmt = "tar.gz";
sha256 = {
x86_64-linux = "1kbjbqb03yapz7067q589gaa7d6cqaipj7hmp1l3nh0bmggzsc4c";
x86_64-darwin = "1qgadm52c5lzkvgvqrz0n8brm4qbjg8hf1dk6a2ynqhqjxcwbj4r";
aarch64-linux = "0i3yl9rx9h7qkl3k9qk6gg35nhz737qzzbvzvdwkqjaacsbpfgf8";
armv7l-linux = "19iz2bxcq6y8sklr6zcnbp47kki9l00x3nvr213lkk3kj08l0afv";
x86_64-linux = "sha256-I8k6e/bO7TRvnyA0tGMNjUl9zD9LnM5rZ/CPjScuFTA=";
}.${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.52.1";
version = "1.53.2";
pname = "vscode";
executableName = "code" + lib.optionalString isInsiders "-insiders";
@@ -54,8 +41,7 @@ in callPackage ./generic.nix rec {
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" ];
maintainers = with maintainers; [ davegallant ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -69,11 +69,7 @@ in stdenv.mkDerivation {
dontBuild = true;
dontConfigure = true;
installPhase = if system == "x86_64-darwin" then ''
mkdir -p "$out/Applications/${longName}.app" $out/bin
cp -r ./* "$out/Applications/${longName}.app"
ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/code" $out/bin/${executableName}
'' else ''
installPhase = ''
mkdir -p $out/lib/vscode $out/bin
cp -r ./* $out/lib/vscode

View File

@@ -1,36 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq gnused
# Update script for the vscode versions and hashes.
# Usually doesn't need to be called by hand,
# but is called by a bot: https://github.com/samuela/nixpkgs-upkeep/actions
# Call it by hand if the bot fails to automatically update the versions.
set -eou pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
if [ ! -f "$ROOT/vscode.nix" ]; then
echo "ERROR: cannot find vscode.nix in $ROOT"
exit 1
fi
# VSCode
VSCODE_VER=$(curl --fail --silent https://api.github.com/repos/Microsoft/vscode/releases/latest | jq --raw-output .tag_name)
sed -i "s/version = \".*\"/version = \"${VSCODE_VER}\"/" "$ROOT/vscode.nix"
VSCODE_LINUX_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/linux-x64/stable"
VSCODE_LINUX_SHA256=$(nix-prefetch-url ${VSCODE_LINUX_URL})
sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODE_LINUX_SHA256}\"/" "$ROOT/vscode.nix"
VSCODE_DARWIN_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/darwin/stable"
VSCODE_DARWIN_SHA256=$(nix-prefetch-url ${VSCODE_DARWIN_URL})
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODE_DARWIN_SHA256}\"/" "$ROOT/vscode.nix"
VSCODE_LINUX_AARCH64_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/linux-arm64/stable"
VSCODE_LINUX_AARCH64_SHA256=$(nix-prefetch-url ${VSCODE_LINUX_AARCH64_URL})
sed -i "s/aarch64-linux = \".\{52\}\"/aarch64-linux = \"${VSCODE_LINUX_AARCH64_SHA256}\"/" "$ROOT/vscode.nix"
VSCODE_LINUX_ARMV7L_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/linux-armhf/stable"
VSCODE_LINUX_ARMV7L_SHA256=$(nix-prefetch-url ${VSCODE_LINUX_ARMV7L_URL})
sed -i "s/armv7l-linux = \".\{52\}\"/armv7l-linux = \"${VSCODE_LINUX_ARMV7L_SHA256}\"/" "$ROOT/vscode.nix"