From 2d98f7cff3813d46c18acfc31c6d3a53f47d8f13 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Thu, 17 Feb 2022 21:15:04 -0300 Subject: [PATCH] vscode: update the updaters! Now they use update-shell.nix auxiliar file. --- .../vscode/extensions/vscode-lldb/update.sh | 8 +++++--- .../editors/vscode/update-shell.nix | 18 ++++++++++++++++++ .../editors/vscode/update-vscode.sh | 4 ++-- .../editors/vscode/update-vscodium.sh | 4 ++-- 4 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 pkgs/applications/editors/vscode/update-shell.nix diff --git a/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh b/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh index 2fe0cc5cf297..0dc38c6fdb71 100755 --- a/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh +++ b/pkgs/applications/editors/vscode/extensions/vscode-lldb/update.sh @@ -1,5 +1,6 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p jq nix-prefetch +#! /usr/bin/env nix-shell +#! nix-shell ../../update-shell.nix -i bash + set -eo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" if [[ $# -ne 1 ]]; then @@ -12,7 +13,8 @@ FIXME: This script doesn't update patched lldb. Please manually check branches of https://github.com/vadimcn/llvm-project and update lldb with correct version of LLVM. " -nixpkgs=../../../.. +# Ideally, nixpkgs points to default.nix file of Nixpkgs official tree +nixpkgs=../../../../../.. nixFile=./default.nix owner=vadimcn repo=vscode-lldb diff --git a/pkgs/applications/editors/vscode/update-shell.nix b/pkgs/applications/editors/vscode/update-shell.nix new file mode 100644 index 000000000000..aa9488c217f4 --- /dev/null +++ b/pkgs/applications/editors/vscode/update-shell.nix @@ -0,0 +1,18 @@ +{ pkgs ? import ../../../.. { } }: + +# Ideally, pkgs points to default.nix file of Nixpkgs official tree +with pkgs; + +mkShell { + packages = [ + bash + curl + gawk + gnugrep + gnused + jq + nix + nix-prefetch + nix-prefetch-scripts + ]; +} diff --git a/pkgs/applications/editors/vscode/update-vscode.sh b/pkgs/applications/editors/vscode/update-vscode.sh index 709fbe1c7517..67ec7a21b346 100755 --- a/pkgs/applications/editors/vscode/update-vscode.sh +++ b/pkgs/applications/editors/vscode/update-vscode.sh @@ -1,5 +1,5 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p curl jq gnused +#! /usr/bin/env nix-shell +#! nix-shell update-shell.nix -i bash # Update script for the vscode versions and hashes. # Usually doesn't need to be called by hand, diff --git a/pkgs/applications/editors/vscode/update-vscodium.sh b/pkgs/applications/editors/vscode/update-vscodium.sh index 79c6b497ecc6..377068c08214 100755 --- a/pkgs/applications/editors/vscode/update-vscodium.sh +++ b/pkgs/applications/editors/vscode/update-vscodium.sh @@ -1,5 +1,5 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p curl gnugrep gnused gawk +#! /usr/bin/env nix-shell +#! nix-shell update-shell.nix -i bash # Update script for the vscode versions and hashes. # Usually doesn't need to be called by hand,