From 447b3eccaf30d7a74e61ebd465a5d88897368c31 Mon Sep 17 00:00:00 2001 From: Xandor Schiefer Date: Sun, 21 Apr 2024 21:56:13 +0200 Subject: [PATCH 1/2] maintainers: add zeorin --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index f8076c718c21..6600509ccece 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -23018,6 +23018,16 @@ fingerprint = "1127 F188 280A E312 3619 3329 87E1 7EEF 9B18 B6C9"; }]; }; + zeorin = { + name = "Xandor Schiefer"; + email = "me@xandor.co.za"; + matrix = "@zeorin:matrix.org"; + github = "zeorin"; + githubId = 1187078; + keys = [{ + fingerprint = "863F 093A CF82 D2C8 6FD7 FB74 5E1C 0971 FE4F 665A"; + }]; + }; zeratax = { email = "mail@zera.tax"; github = "zeratax"; From 2bd7c2787428b3c3041cdd3a3ace6c14c24b0a4a Mon Sep 17 00:00:00 2001 From: Xandor Schiefer Date: Sun, 21 Apr 2024 21:56:44 +0200 Subject: [PATCH 2/2] vscode-js-debug: init at 1.90.0 Closes https://github.com/NixOS/nixpkgs/issues/281031. --- pkgs/by-name/vs/vscode-js-debug/package.nix | 82 +++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pkgs/by-name/vs/vscode-js-debug/package.nix diff --git a/pkgs/by-name/vs/vscode-js-debug/package.nix b/pkgs/by-name/vs/vscode-js-debug/package.nix new file mode 100644 index 000000000000..613350da9b8d --- /dev/null +++ b/pkgs/by-name/vs/vscode-js-debug/package.nix @@ -0,0 +1,82 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +, jq +, libsecret +, pkg-config +, nodePackages +, runCommand +, vscode-js-debug +, nix-update-script +}: + +buildNpmPackage rec { + pname = "vscode-js-debug"; + version = "1.90.0"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "vscode-js-debug"; + rev = "v${version}"; + hash = "sha256-SmWPKO7CEXaOIkuf9Y+825EfGsIz+rWlnCsh1T2UEF0="; + }; + + npmDepsHash = "sha256-DfeaiqKadTnGzOObK01ctlavwqTMa0tqn59sLZMPvUM="; + + nativeBuildInputs = [ pkg-config nodePackages.node-gyp jq ]; + + buildInputs = [ libsecret ]; + + postPatch = '' + jq ' + .scripts.postinstall |= empty | # tries to install playwright, not necessary for build + .scripts.build |= "gulp dapDebugServer" | # there is no build script defined + .bin |= "./dist/src/dapDebugServer.js" # there is no bin output defined + ' ${src}/package.json > package.json + ''; + + makeCacheWritable = true; + + npmInstallFlags = [ "--include=dev" ]; + + preBuild = '' + export PATH="node_modules/.bin:$PATH" + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ "--version-regex" "v((?!\d{4}\.\d\.\d{3}).*)" ]; + }; + + passthru.tests.test = runCommand "${pname}-test" + { + nativeBuildInputs = [ vscode-js-debug ]; + meta.timeout = 60; + } '' + output=$(js-debug --help 2>&1) + if grep -Fw -- "Usage: dapDebugServer.js [port|socket path=8123] [host=localhost]" - <<< "$output"; then + touch $out + else + echo "Expected help output was not found!" >&2 + echo "The output was:" >&2 + echo "$output" >&2 + exit 1 + fi + ''; + + meta = with lib; { + description = "A DAP-compatible JavaScript debugger"; + longDescription = '' + This is a [DAP](https://microsoft.github.io/debug-adapter-protocol/)-based + JavaScript debugger. It debugs Node.js, Chrome, Edge, WebView2, VS Code + extensions, and more. It has been the default JavaScript debugger in + Visual Studio Code since 1.46, and is gradually rolling out in Visual + Studio proper. + ''; + homepage = "https://github.com/microsoft/vscode-js-debug"; + changelog = + "https://github.com/microsoft/vscode-js-debug/blob/v${version}/CHANGELOG.md"; + mainProgram = "js-debug"; + license = licenses.mit; + maintainers = with maintainers; [ zeorin ]; + }; +}