mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 01:04:25 +00:00
vscode-extensions.vadimcn.vscode-lldb: 1.9.1 -> 1.9.2 (#236915)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
73768b43bc
commit
9c16766ee0
@ -0,0 +1,22 @@
|
||||
From 4f64ad191ec79b9f40843f88e3ac5910720636da Mon Sep 17 00:00:00 2001
|
||||
From: Changsheng Wu <Congee@users.noreply.github.com>
|
||||
Date: Fri, 9 Jun 2023 15:41:53 -0400
|
||||
Subject: [PATCH] Update Cargo.toml
|
||||
|
||||
---
|
||||
adapter/Cargo.toml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/adapter/Cargo.toml b/adapter/Cargo.toml
|
||||
index bc86723..f5f26ce 100644
|
||||
--- a/adapter/Cargo.toml
|
||||
+++ b/adapter/Cargo.toml
|
||||
@@ -39,7 +39,7 @@ winapi = { version = "0.3.8", features = ["std", "wincon", "namedpipeapi"] }
|
||||
winreg = "0.6.2"
|
||||
|
||||
[lib]
|
||||
-crate-type = ["staticlib"]
|
||||
+crate-type = ["dylib", "rlib"]
|
||||
|
||||
[[bin]]
|
||||
name = "codelldb"
|
@ -1,8 +1,7 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6ae4dfb..519f544 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -16,13 +16,6 @@ endif()
|
||||
@@ -16,13 +16,6 @@
|
||||
set(VERSION "${VERSION}${VERSION_SUFFIX}")
|
||||
message("Version ${VERSION}")
|
||||
|
||||
@ -16,11 +15,11 @@ index 6ae4dfb..519f544 100644
|
||||
if (CMAKE_SYSROOT)
|
||||
set(CMAKE_C_FLAGS "--sysroot=${CMAKE_SYSROOT} ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "--sysroot=${CMAKE_SYSROOT} ${CMAKE_CXX_FLAGS}")
|
||||
@@ -93,16 +86,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY)
|
||||
@@ -102,16 +95,6 @@
|
||||
configure_file(webpack.config.js ${CMAKE_CURRENT_BINARY_DIR}/webpack.config.js @ONLY)
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
-# Run 'npm install'
|
||||
-# Install node_modules
|
||||
-execute_process(
|
||||
- COMMAND ${NPM} ci # like install, but actually respects package-lock file.
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
@ -30,10 +29,10 @@ index 6ae4dfb..519f544 100644
|
||||
- message(FATAL_ERROR "npm intall failed: ${Result}")
|
||||
-endif()
|
||||
-
|
||||
# Copy it back, so we can commit the lock file.
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@@ -154,6 +137,7 @@ add_custom_target(tests
|
||||
# Resolve $refs
|
||||
execute_process(
|
||||
COMMAND ${WithEnv} NODE_PATH=${CMAKE_CURRENT_BINARY_DIR}/node_modules node ${CMAKE_CURRENT_SOURCE_DIR}/tools/prep-package.js ${CMAKE_CURRENT_BINARY_DIR}/package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json
|
||||
@@ -169,6 +152,7 @@
|
||||
|
||||
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_BINARY_DIR}/README.md)
|
||||
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.md ${CMAKE_CURRENT_BINARY_DIR}/CHANGELOG.md)
|
||||
@ -41,7 +40,7 @@ index 6ae4dfb..519f544 100644
|
||||
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/images/lldb.png ${CMAKE_CURRENT_BINARY_DIR}/images/lldb.png)
|
||||
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/images/user.svg ${CMAKE_CURRENT_BINARY_DIR}/images/user.svg)
|
||||
add_copy_file(PackageFiles ${CMAKE_CURRENT_SOURCE_DIR}/images/users.svg ${CMAKE_CURRENT_BINARY_DIR}/images/users.svg)
|
||||
@@ -170,6 +154,7 @@ add_custom_target(dev_debugging
|
||||
@@ -185,6 +169,7 @@
|
||||
set(PackagedFilesBootstrap
|
||||
README.md
|
||||
CHANGELOG.md
|
||||
@ -49,4 +48,3 @@ index 6ae4dfb..519f544 100644
|
||||
extension.js
|
||||
images/*
|
||||
syntaxes/*
|
||||
|
||||
|
@ -5,7 +5,7 @@ assert lib.versionAtLeast python3.version "3.5";
|
||||
let
|
||||
publisher = "vadimcn";
|
||||
pname = "vscode-lldb";
|
||||
version = "1.9.1";
|
||||
version = "1.9.2";
|
||||
|
||||
vscodeExtUniqueId = "${publisher}.${pname}";
|
||||
vscodeExtPublisher = publisher;
|
||||
@ -15,7 +15,7 @@ let
|
||||
owner = "vadimcn";
|
||||
repo = "vscode-lldb";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-DqxdZtSW8TZaOFGXOZQ7a4tmgRj6iAWDppCNomdfVxY=";
|
||||
hash = "sha256-6QmYRlSv8jY3OE3RcYuZt+c3z6GhFc8ESETVfCfF5RI=";
|
||||
};
|
||||
|
||||
# need to build a custom version of lldb and llvm for enhanced rust support
|
||||
@ -25,7 +25,7 @@ let
|
||||
pname = "${pname}-adapter";
|
||||
inherit version src;
|
||||
|
||||
cargoSha256 = "sha256-+hfNkr9cZbOcWdWKUWUqDj9a0PKjKeApFXYZzS1XokE=";
|
||||
cargoHash = "sha256-Qq2igtH1XIB+NAEES6hdNZcMbEmaFN69qIJ+gTYupvQ=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@ -38,6 +38,8 @@ let
|
||||
"--bin=codelldb"
|
||||
];
|
||||
|
||||
patches = [ ./adapter-output-shared_object.patch ];
|
||||
|
||||
# Tests are linked to liblldb but it is not available here.
|
||||
doCheck = false;
|
||||
};
|
||||
@ -46,7 +48,7 @@ let
|
||||
pname = "${pname}-node-deps";
|
||||
inherit version src;
|
||||
|
||||
npmDepsHash = "sha256-Cdlq1jxHSCfPjXhasClc6XzEUp3vlLgkStbhYtCyc7E=";
|
||||
npmDepsHash = "sha256-fMKGi+AJTMlWl7SQtZ21hUwOLgqlFYDhwLvEergQLfI=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3
|
||||
@ -82,12 +84,6 @@ in stdenv.mkDerivation {
|
||||
|
||||
patches = [ ./cmake-build-extension-only.patch ];
|
||||
|
||||
postPatch = ''
|
||||
# temporary patch for forgotten version updates
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "1.9.0" ${version}
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
cp -r ${nodeDeps}/lib/node_modules .
|
||||
'';
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell ../../update-shell.nix -i bash -p wget prefetch-npm-deps
|
||||
#! nix-shell ../../update-shell.nix -i bash -p nix-prefetch-github prefetch-npm-deps
|
||||
|
||||
set -eo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
@ -18,7 +18,7 @@ version="$1"
|
||||
if [[ $# -ne 1 ]]; then
|
||||
# no version specified, find the newest one
|
||||
version=$(
|
||||
curl -s "https://api.github.com/repos/$owner/$repo/releases" |
|
||||
curl -sL "https://api.github.com/repos/$owner/$repo/releases" |
|
||||
jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output |
|
||||
sed 's/[\"v]//'
|
||||
)
|
||||
@ -29,19 +29,18 @@ if grep -q 'cargoSha256 = ""' ./default.nix; then
|
||||
fi
|
||||
if [[ "$version" == "$old_version" ]]; then
|
||||
echo "Up to date: $version"
|
||||
exit
|
||||
fi
|
||||
echo "$old_version -> $version"
|
||||
|
||||
# update hashes
|
||||
sed -E 's/\bversion = ".*?"/version = "'$version'"/' --in-place "$nixFile"
|
||||
srcHash=$(nix-prefetch fetchFromGitHub --owner vadimcn --repo vscode-lldb --rev "v$version")
|
||||
srcHash=$(nix-prefetch-github vadimcn vscode-lldb --rev "v$version" | jq --raw-output .sha256)
|
||||
sed -E 's#\bsha256 = ".*?"#sha256 = "'$srcHash'"#' --in-place "$nixFile"
|
||||
cargoHash=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).vscode-extensions.vadimcn.vscode-lldb.adapter.cargoDeps.overrideAttrs (_: { outputHash = sha256; })")
|
||||
sed -E 's#\bcargoSha256 = ".*?"#cargoSha256 = "'$cargoHash'"#' --in-place "$nixFile"
|
||||
|
||||
pushd $TMPDIR
|
||||
wget https://raw.githubusercontent.com/$owner/$repo/v${version}/package-lock.json
|
||||
curl -LO https://raw.githubusercontent.com/$owner/$repo/v${version}/package-lock.json
|
||||
npmDepsHash=$(prefetch-npm-deps ./package-lock.json)
|
||||
popd
|
||||
sed -E 's#\bnpmDepsHash = ".*?"#npmDepsHash = "'$npmDepsHash'"#' --in-place "$nixFile"
|
||||
|
Loading…
Reference in New Issue
Block a user