-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode-extensions.vadimcn.vscode-lldb: init at 1.5.3 #91250
Conversation
I'd love for this to be merged - for others who can't wait, I suggest downloading the full vsix manually from the the owners github https://github.com/vadimcn/vscode-lldb/releases and installing it from command line. you'll have to manually patch the executables inside the extension with But I'm guessing this PR would negate the need for all of that! |
9af5d49
to
736d771
Compare
736d771
to
89ef776
Compare
ping @jonringer |
89ef776
to
e992352
Compare
Refactored to use standalone generated |
e992352
to
1f7e5e0
Compare
According to #97444 (comment), change to use global r? @jonringer |
name = "vscode-lldb"; | ||
version = "1.5.3"; | ||
|
||
dylibExt = stdenv.hostPlatform.extensions.sharedLibrary; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an unused variable, is it possible to remove it?
postFixup = '' | ||
wrapProgram $out/adapter/codelldb \ | ||
--prefix PATH : "${python3}/bin" \ | ||
--prefix LD_LIBRARY_PATH : "${python3}/lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment explaining why this is necessary? (e.g., vscode-lldb loads libpython at runtime)
dontStrip = true; | ||
dontPatchELF = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also deserve a comment.
}; | ||
|
||
in vscode-utils.buildVscodeExtension { | ||
inherit name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include the version in name
. Also include the version
attribute in the derivation to make it easy to extract the version when generating package.json
.
inherit name; | |
inherit version; | |
name = "${name}-${version}"; |
@@ -0,0 +1,24 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would help to include a script (maybe generate.sh
?) that would generate this automatically. Here's an example:
#!/usr/bin/env bash
# Script to generate package.json needed to create the build environment.
set -eu -o pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
SRC="$(nix-build -A vscode-extensions.vadimcn.vscode-lldb.src.src --no-out-link ../../../..)"
VERSION="$(nix-instantiate --eval -A vscode-extensions.vadimcn.vscode-lldb.version ../../../.. | tr -d '"')"
JQ_BIN="$(nix-build -A jq --no-out-link ../../../..)/bin/jq"
main() {
jq "{\"name\": \"vscode-lldb\", \"version\": \"$VERSION\", \"dependencies\": (.devDependencies + .dependencies)}" \
"$SRC/package.json" \
> build-deps/package.json
}
jq() {
command "$JQ_BIN" "$@"
}
main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has been going on for months, I think we could have another PR to do refinements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was able to build it.
Motivation for this change
Package
vadimcn.vscode-lldb
, a new vscode extension for debugging and pretty print support (especially for rust) with nativelldb
.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)lldb
,python3
, etc.)